Skip to content

Commit be50962

Browse files
authored
Merge pull request #17 from reka-ai/fix/add-github-release
feat: create GitHub Release automatically after npm publish
2 parents 8752ac1 + 36c802d commit be50962

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
permissions:
6161
# Required to mint an OIDC token for npm provenance attestation.
6262
id-token: write
63-
# Scoped down from the default (write) for least-privilege publishing.
64-
contents: read
63+
# Required to create GitHub Releases.
64+
contents: write
6565

6666
steps:
6767
- uses: actions/checkout@v4
@@ -89,3 +89,8 @@ jobs:
8989
npm publish
9090
env:
9191
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
92+
93+
- name: Create GitHub Release
94+
env:
95+
GH_TOKEN: ${{ github.token }}
96+
run: gh release create "${{ github.ref_name }}" --title "v${{ github.ref_name }}" --generate-notes

0 commit comments

Comments
 (0)