Skip to content

Commit f619c64

Browse files
authored
Merge pull request #7 from scoobynko/enhance-figma-skill-description
Add automated release workflow
2 parents d32fe16 + b7582d9 commit f619c64

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Extract version from tag
17+
id: version
18+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
19+
20+
- name: Extract changelog for this version
21+
id: changelog
22+
run: |
23+
VERSION="${{ steps.version.outputs.VERSION }}"
24+
# Extract the section for this version from CHANGELOG.md
25+
awk "/## \[${VERSION}\]/,/## \[/" CHANGELOG.md | sed '/## \['"${VERSION}"'\]/d; /## \[/d' > release_notes.md
26+
27+
- name: Create Release
28+
uses: softprops/action-gh-release@v1
29+
with:
30+
name: Release v${{ steps.version.outputs.VERSION }}
31+
body_path: release_notes.md
32+
draft: false
33+
prerelease: false
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)