Skip to content

Commit 396dbd1

Browse files
authored
ci: fix github-publish.yml permissions (#59)
Use the new permissions syntax in workflow file, and use GITHUB_TOKEN to publish the package
1 parent c501270 commit 396dbd1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/github-publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ on:
66
tags:
77
- 'v*.*.*'
88

9+
permissions:
10+
contents: read
11+
packages: write
12+
913
jobs:
1014
github-publish:
1115
name: github-publish
1216
runs-on: ubuntu-latest
1317
steps:
1418
- name: Checkout repository
15-
uses: actions/checkout@v3
16-
- uses: actions/setup-node@v3
19+
uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
1721
with:
1822
node-version: 18
1923
registry-url: "https://npm.pkg.github.com"
@@ -27,4 +31,4 @@ jobs:
2731
- name: Publish package
2832
run: npm publish
2933
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.PAT_TOKEN }}
34+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)