Skip to content

Commit 24ef676

Browse files
Use npm trusted publishing instead of token (#959)
Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
1 parent 7db26ae commit 24ef676

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
publish-node:
6161
needs: build
62-
name: Publish Node package
62+
name: Publish Node package to GitHub Packages
6363
runs-on: ubuntu-24.04
6464
permissions:
6565
contents: read

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,23 @@ jobs:
1414

1515
publish-node:
1616
needs: verify-versions
17-
name: Publish Node package
17+
name: Publish Node package to npm registry
1818
runs-on: ubuntu-24.04
19+
permissions:
20+
contents: read
21+
id-token: write # Required for OIDC
1922
steps:
2023
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2124
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2225
with:
2326
node-version: "lts/*"
2427
registry-url: "https://registry.npmjs.org"
28+
# Ensure npm 11.5.1 or later for trusted publishing support
29+
- name: Update npm
30+
run: npm install -g npm@latest
2531
- name: Build
2632
run: make build-node
2733
- name: Publish
28-
env:
29-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3034
run: ${{ github.workspace }}/.github/scripts/npm_publish.sh latest
3135
working-directory: node
3236

0 commit comments

Comments
 (0)