Skip to content

Commit 0bbbb5c

Browse files
committed
Update github actions
1 parent 3119487 commit 0bbbb5c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/npm-publish.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
22
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
33

4-
name: Node.js Package
5-
4+
name: Publish Package to npmjs
65
on:
76
release:
8-
types: [created]
9-
7+
types: [published]
108
jobs:
119
publish-npm:
1210
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
id-token: write
1314
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
1617
with:
17-
node-version: 16
18+
node-version: '20.x'
1819
registry-url: https://registry.npmjs.org/
19-
- run: npm publish
20+
- run: npm publish --provenance --access public
2021
env:
21-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
22+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)