Skip to content

Commit 39c76b9

Browse files
committed
Remove static token from npm publish pipeline
1 parent d032669 commit 39c76b9

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/npm-publish-github-packages.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,29 @@ on:
77

88
permissions:
99
contents: read
10-
packages: write
10+
id-token: write
1111

1212
jobs:
1313
build:
14+
name: Build and publish
1415
runs-on: ubuntu-latest
16+
1517
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-node@v4
18+
- name: Checkout
19+
uses: actions/checkout@v6
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v6
1823
with:
1924
node-version: 20
2025
registry-url: 'https://registry.npmjs.org'
21-
- run: npm ci
26+
cache: "npm"
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
2231
- name: Build distribution
2332
run: npm run build:dist
2433

2534
- name: Publish to npm
2635
run: npm publish --access public
27-
env:
28-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)