From 13cf8bbe6ebe76975a4bfdeff370e6e65be262aa Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Mon, 31 Aug 2026 14:46:40 +0800 Subject: [PATCH 1/2] chore: publish via npm OIDC trusted publishing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Swap the token-based publish (the NPM_AUTOMATION_TOKEN expired and npm now favors short-lived tokens) for OIDC trusted publishing: npmjs.com trusts this repository's publish.yml workflow directly, so no npm token is stored or rotated. Requires pnpm >= 10.20 — bump the toolchain to the latest 10.x (10.34.5) everywhere it is pinned. Co-Authored-By: Claude Fable 5 --- .github/workflows/codecov.yml | 2 +- .github/workflows/main.yml | 2 +- .github/workflows/publish.yml | 7 ++++--- package.json | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index deec83f..3d56697 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node and pnpm uses: silverhand-io/actions-node-pnpm-run-steps@v5 with: - pnpm-version: 10.8.0 + pnpm-version: 10.34.5 node-version: 20 - name: Test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 029cad2..6c79f35 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: - name: Setup Node and pnpm uses: silverhand-io/actions-node-pnpm-run-steps@v5 with: - pnpm-version: 10.8.0 + pnpm-version: 10.34.5 node-version: ${{ matrix.node-version }} - name: Build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8e5770b..019188c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,11 +23,12 @@ jobs: - name: Setup Node and pnpm uses: silverhand-io/actions-node-pnpm-run-steps@v5 with: - pnpm-version: 10.8.0 + pnpm-version: 10.34.5 node-version: 22 + # Authenticates via OIDC trusted publishing (configured on npmjs.com for this + # package: repository mcp-auth/js, workflow publish.yml) — no npm token involved. + # Requires pnpm >= 10.20 and the `id-token: write` permission above. - name: Publish to npm working-directory: packages/mcp-auth run: pnpm publish --provenance --no-git-checks - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }} diff --git a/package.json b/package.json index ffcf7ec..36399c9 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,11 @@ "engines": { "node": "^20.19.0 || ^22.0.0 || ^23.0.0 || ^24.0.0" }, - "packageManager": "pnpm@10.8.0", + "packageManager": "pnpm@10.34.5", "devEngines": { "packageManager": { "name": "pnpm", - "version": "10.8.0", + "version": "10.34.5", "onFail": "error" } }, From 79e61762a1619abd082c2bf309efcbf434bd0081 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Mon, 31 Aug 2026 16:11:17 +0800 Subject: [PATCH 2/2] fix: publish on Node 24 so the delegated npm CLI supports OIDC pnpm publish delegates the actual publish to the npm CLI, and npm's trusted publishing requires npm >= 11.5.1: Node 22 still bundles npm 10.x, Node 24 bundles a compatible npm. Co-Authored-By: Claude Fable 5 --- .github/workflows/publish.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 019188c..71eb404 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,11 +24,14 @@ jobs: uses: silverhand-io/actions-node-pnpm-run-steps@v5 with: pnpm-version: 10.34.5 - node-version: 22 + # Node 24, not 22: `pnpm publish` delegates the actual publish to the npm CLI, + # and npm's OIDC trusted publishing requires npm >= 11.5.1 — bundled with + # Node 24, while Node 22 still ships npm 10.x. + node-version: 24 # Authenticates via OIDC trusted publishing (configured on npmjs.com for this # package: repository mcp-auth/js, workflow publish.yml) — no npm token involved. - # Requires pnpm >= 10.20 and the `id-token: write` permission above. + # Requires the `id-token: write` permission above. - name: Publish to npm working-directory: packages/mcp-auth run: pnpm publish --provenance --no-git-checks