Skip to content

Commit 3a08e18

Browse files
fangqclaude
andcommitted
[ci] publish to npm by trusted publishing (OIDC), not a token
The deploy job uses Node.js 24 with the latest npm (trusted publishing needs npm 11.5.1 or later) and no NODE_AUTH_TOKEN; npm adds provenance itself. The NPM_TOKEN secret is no longer used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b8e3ebe commit 3a08e18

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎.github/workflows/run_test.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ jobs:
5151
- name: Set up Node.js
5252
uses: actions/setup-node@v4
5353
with:
54-
node-version: "20"
54+
node-version: "24"
5555
registry-url: "https://registry.npmjs.org"
56+
- name: Update npm (trusted publishing needs npm 11.5.1 or later)
57+
run: npm install -g npm@latest
5658
- name: Install dependencies and build
5759
run: |
5860
npm ci
@@ -62,8 +64,6 @@ jobs:
6264
shell: bash
6365
run: |
6466
$GITHUB_WORKSPACE/.github/check-npm-upload.sh
65-
- name: Upload package to npm
67+
- name: Upload package to npm (trusted publishing through OIDC, no token; with provenance)
6668
if: ${{ github.actor == 'fangq' && steps.perform_npm_upload_check.outputs.perform_npm_upload == 1 && github.event_name != 'pull_request' }}
67-
run: npm publish --provenance --access public
68-
env:
69-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
69+
run: npm publish --access public

0 commit comments

Comments
 (0)