Skip to content

Commit 08550d8

Browse files
committed
ci: update publish.yml to grant write permissions and use GITHUB_TOKEN
1 parent b5e8d22 commit 08550d8

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ jobs:
1818
environment: publish
1919
runs-on: ubuntu-latest
2020
permissions:
21-
contents: read
21+
contents: write
2222
id-token: write
2323
steps:
2424
- uses: actions/checkout@v4
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
2527
- name: Check if on main branch
2628
run: |
2729
if [[ $GITHUB_REF != 'refs/heads/main' ]]; then
@@ -45,4 +47,5 @@ jobs:
4547
git push origin main --follow-tags
4648
- run: npm publish --provenance --access public
4749
env:
48-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
50+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)