Skip to content

Commit f05e40e

Browse files
authored
Merge pull request #102 from ipinfo/silvano/eng-445-update-release-process-for-npm
Update release workflow to support new NPM trusted publishing
2 parents 3fe4bc0 + 8e19feb commit f05e40e

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/cd_npm.yml

Lines changed: 17 additions & 4 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:
15-
node-version: 16
20+
node-version: 20
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:
27-
node-version: 16
36+
node-version: 20
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)