Skip to content

Commit fab7301

Browse files
committed
fix: update GitHub release creation to use modern approach
1 parent 1daf792 commit fab7301

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
name: Create GitHub Release
3535
runs-on: ubuntu-latest
3636
needs: publish
37+
permissions:
38+
contents: write
3739
steps:
3840
- uses: actions/checkout@v4
3941
- name: Extract changelog for this version
@@ -42,12 +44,11 @@ jobs:
4244
sed -n "/## \[$TAG_VERSION\]/,/## \[/p" CHANGELOG.md | sed '$d' > release_notes.md
4345
echo "Release notes for v$TAG_VERSION:"
4446
cat release_notes.md
45-
- uses: actions/create-release@v1
47+
- name: Create GitHub Release
48+
run: |
49+
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
50+
gh release create "${{ github.ref_name }}" \
51+
--title "Release v$TAG_VERSION" \
52+
--notes-file release_notes.md
4653
env:
4754
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
with:
49-
tag_name: ${{ github.ref }}
50-
release_name: Release ${{ github.ref }}
51-
body_path: release_notes.md
52-
draft: false
53-
prerelease: false

0 commit comments

Comments
 (0)