Skip to content

Commit 9cd0806

Browse files
committed
ci: simplify release notes workflow by using tag version
1 parent 95cfd88 commit 9cd0806

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

.github/workflows/release_notes.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,21 @@ on:
77
jobs:
88
create-release-notes:
99
runs-on: ubuntu-latest
10-
if: "startsWith(github.event.head_commit.message, 'chore(release):')"
1110
environment:
1211
name: Release
1312

1413
steps:
1514
- name: Checkout code
1615
uses: actions/checkout@v4
1716

18-
- name: Extract version from commit message
19-
id: extract_version
20-
run: |
21-
COMMIT_MSG="${{ github.event.head_commit.message }}"
22-
if [[ "$COMMIT_MSG" =~ chore\(release\):\ v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
23-
VERSION="v${BASH_REMATCH[1]}"
24-
echo "version=$VERSION" >> $GITHUB_OUTPUT
25-
else
26-
exit 1
27-
fi
28-
2917
- name: Create Release
3018
uses: softprops/action-gh-release@v2
3119
with:
32-
tag_name: ${{ steps.extract_version.outputs.version }}
33-
name: ${{ steps.extract_version.outputs.version }}
20+
tag_name: ${{ github.event.release.tag_name }}
21+
name: ${{ github.event.release.tag_name }}
3422
draft: false
3523
prerelease: false
3624
make_latest: 'true'
3725
token: ${{ secrets.GOASTER_TOKEN }}
38-
body_path: ${{ github.workspace }}/.changes/${{ steps.extract_version.outputs.version }}.md
26+
body_path: ${{ github.workspace }}/.changes/${{ github.event.release.tag_name }}.md
3927
generate_release_notes: false

0 commit comments

Comments
 (0)