Skip to content

Commit 9654fab

Browse files
authored
Update publish CI script
Using trusted publisher instead of tokens
1 parent 6fbf06e commit 9654fab

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@ name: npm publish
22
on:
33
release:
44
types: [created]
5+
permissions:
6+
contents: read
7+
id-token: write
58
jobs:
6-
build:
9+
publish:
710
runs-on: ubuntu-latest
811
steps:
9-
- uses: actions/checkout@v2
10-
# Setup .npmrc file to publish to npm
11-
- uses: actions/setup-node@v1
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
1214
with:
13-
node-version: '14.x'
15+
node-version: 'lts/*'
1416
registry-url: 'https://registry.npmjs.org'
15-
- run: npm install
16-
# Publish to npm
17-
- run: npm publish --access public
18-
env:
19-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17+
- run: npm ci
18+
- run: npm publish --provenance --access public

0 commit comments

Comments
 (0)