Skip to content

Commit 6174562

Browse files
committed
ci: prepare NPM publishing workflow to work with Trusted Publisher (OIDC)
1 parent 3e0ec34 commit 6174562

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/publish_npm_package.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
jobs:
88
publish:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
id-token: write
1013

1114
steps:
1215
- name: Checkout sources
@@ -21,7 +24,8 @@ jobs:
2124
- name: Install Node.js
2225
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
2326
with:
24-
node-version: 22
27+
node-version: 24
28+
registry-url: https://registry.npmjs.org/
2529

2630
- name: Install wasm-pack
2731
run: cargo install --locked wasm-pack
@@ -33,6 +37,6 @@ jobs:
3337
run: cargo install --locked wasm-bindgen-cli
3438

3539
- name: Build and publish package
36-
run: cd js-wasm && npm login && npm publish --access public
40+
run: cd js-wasm && npm publish --access public
3741
env:
3842
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)