Skip to content

Commit 114d0f4

Browse files
committed
Update release workflow to support new NPM trusted publishing
1 parent 3fe4bc0 commit 114d0f4

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/cd_npm.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,42 @@ on:
55
tags:
66
- "v*"
77

8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
812
jobs:
913
build:
1014
runs-on: ubuntu-latest
1115
steps:
1216
- uses: actions/checkout@v4
17+
1318
- uses: actions/setup-node@v4
1419
with:
1520
node-version: 16
21+
1622
- run: npm ci
23+
1724
- run: npm test
1825
env:
1926
IPINFO_TOKEN: ${{secrets.IPINFO_TOKEN}}
27+
2028
publish:
2129
needs: build
2230
runs-on: ubuntu-latest
2331
steps:
2432
- uses: actions/checkout@v4
33+
2534
- uses: actions/setup-node@v4
2635
with:
2736
node-version: 16
2837
registry-url: https://registry.npmjs.org/
38+
39+
- name: Update npm
40+
run: npm install -g npm@latest
41+
2942
- run: npm ci
43+
3044
- run: npm run build
45+
3146
- run: npm publish
32-
env:
33-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)