Update npm workflow for trusted publishing Updated Node.js version from 22 to 24 and added permissions for OIDC.

d118eee014330c37978cc0226f4ca74a1f321eea

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +6 -4Showing whitespace changes
.github/workflows/npm-publish.yml+6 -4
@@ -7,6 +7,10 @@ on:
77 release:
88 types: [created]
99
10+permissions:
11+ id-token: write # Required for OIDC
12+ contents: read
13+
1014jobs:
1115 build:
1216 runs-on: ubuntu-latest
@@ -14,7 +18,7 @@ jobs:
1418 - uses: actions/checkout@v3
1519 - uses: actions/setup-node@v3
1620 with:
1721 node-version: 2224
1822 - run: npm ci
1923
2024 publish-npm:
@@ -24,9 +28,7 @@ jobs:
2428 - uses: actions/checkout@v3
2529 - uses: actions/setup-node@v3
2630 with:
2731 node-version: 2224
2832 registry-url: https://registry.npmjs.org/
2933 - run: npm ci
3034 - run: npm publish
31- env:
32- NODE_AUTH_TOKEN: ${{secrets.npm_token}}