Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

Commit 42153c5

Browse files
mcp-tool-shopclaude
andcommitted
ci: switch npm publish to OIDC trusted publishing
This repo's release.yml authenticated npm publish via NODE_AUTH_TOKEN wired to the NPM_TOKEN secret. That pattern failed in prod on 2026-06-02 when @mcptoolshop/backprop-trace's NPM_TOKEN expired (npm masks an expired token as E404, not 403). Switch to npm Trusted Publishing (OIDC), matching the proven backprop-trace fix: remove NODE_AUTH_TOKEN/NPM_TOKEN from the publish step; add npm install -g npm@latest (OIDC needs npm >= 11.5.1; Node 22 ships 10.9.x); keep id-token: write and npm publish --provenance --access public. Inert until a Trusted Publisher is configured on npmjs.com for @mcptoolshop/ai-loadout bound to ai-loadout / release.yml. The NPM_TOKEN secret is intentionally retained as a revert path until the first OIDC release is confirmed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1f47527 commit 42153c5

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release
22

33
# Fires on git tags shaped like v1.0.0, v1.0.1, v1.1.0, etc.
44
# - Builds + verifies (tests).
5-
# - Publishes to npm with --provenance (uses NPM_TOKEN secret).
5+
# - Publishes to npm with --provenance via npm Trusted Publishing (OIDC).
66
# - Creates a GitHub Release with auto-generated notes.
77

88
on:
@@ -62,10 +62,14 @@ jobs:
6262
fi
6363
echo "CLI version smoke: $BUILT_VERSION"
6464
65+
# OIDC trusted publishing requires npm >= 11.5.1; Node 20 bundles
66+
# npm 10.x, so upgrade the global npm before the publish call.
67+
- name: Upgrade npm for OIDC trusted publishing (>= 11.5.1)
68+
run: npm install -g npm@latest
69+
6570
- name: Publish to npm (with provenance)
71+
# Auth via npm Trusted Publishing (OIDC) - intentionally NO NODE_AUTH_TOKEN.
6672
run: npm publish --provenance --access public
67-
env:
68-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6973

7074
- name: Create GitHub Release
7175
env:

0 commit comments

Comments
 (0)