Skip to content

Commit 5e8e329

Browse files
committed
ci: Use npm trusted publishers instead of tokens
1 parent c765300 commit 5e8e329

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/npm_publish.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ on:
55
- 'v*'
66
workflow_dispatch:
77

8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: read
11+
812
jobs:
913
build-and-publish:
1014
runs-on: ubuntu-24.04
11-
permissions:
12-
contents: read
13-
id-token: write
1415
steps:
1516
- uses: actions/checkout@v4
1617
- uses: dtolnay/rust-toolchain@stable
@@ -22,9 +23,11 @@ jobs:
2223
run: ./scripts/build.sh
2324
- uses: actions/setup-node@v4
2425
with:
26+
node-version: 'lts/*'
2527
registry-url: 'https://registry.npmjs.org'
28+
# Ensure npm 11.5.1 or later is installed
29+
- name: Update npm
30+
run: sudo npm install -g npm@latest
2631
- name: Publish to npm
2732
working-directory: ./web-client/dist
28-
run: npm publish --provenance
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.SISOU_NPM_TOKEN }}
33+
run: npm publish

0 commit comments

Comments
 (0)