Skip to content

Commit 6c7de7a

Browse files
committed
fix workflows/publish-to-npm-registry.yml (trusted publishers)
1 parent b0b127e commit 6c7de7a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/publish-to-npm-registry.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ name: Publish Package to npmjs
33
on:
44
release:
55
types: [published]
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
611
jobs:
712
build:
813
runs-on: ubuntu-latest
914
steps:
10-
- uses: actions/checkout@v3
11-
# Setup .npmrc file to publish to npm
12-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
1317
with:
14-
node-version: "16.x"
18+
node-version: "20.x"
1519
registry-url: "https://registry.npmjs.org"
1620
- run: npm ci
17-
- run: npm publish
18-
env:
19-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
21+
- run: npm publish --provenance --access public

0 commit comments

Comments
 (0)