@@ -24,13 +24,16 @@ jobs:
2424 - name : Checkout code
2525 uses : actions/checkout@v5
2626
27+ # `registry-url:` is deliberately NOT set. It makes setup-node write
28+ # `//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}` into .npmrc;
29+ # with no token in the environment that expands to an empty string,
30+ # npm treats it as configured auth, never attempts the OIDC exchange,
31+ # and fails with ENEEDAUTH. See actions/setup-node#1551. Publishing
32+ # already defaults to registry.npmjs.org, so nothing is lost.
2733 - name : Set up Node.js
2834 uses : actions/setup-node@v5
2935 with :
3036 node-version : " lts/*"
31- # Without registry-url, setup-node writes no .npmrc and
32- # NODE_AUTH_TOKEN never reaches npm, so `npm publish` 401s.
33- registry-url : " https://registry.npmjs.org"
3437
3538 # The version lives in five places (package.json, package-lock.json,
3639 # manifest.json, both fields in server.json, and the McpServer
@@ -93,25 +96,20 @@ jobs:
9396 echo "exists=false" >> "$GITHUB_OUTPUT"
9497 fi
9598
96- # Authenticates by npm trusted publishing (OIDC), which needs no
97- # secret. Configure once at npmjs.com -> package -> Settings ->
98- # Trusted Publisher:
99+ # Authenticated solely by npm trusted publishing (OIDC) — no secret,
100+ # nothing to rotate. Configure once at
101+ # https://www.npmjs.com/package/monobank-mcp-server/access
102+ # under "Trusted Publisher":
99103 # Organization or user: akutishevsky
100104 # Repository: monobank-mcp-server
101105 # Workflow filename: publish.yml
102- # Requires npm >= 11.5.1 / Node >= 22.14; `lts/*` currently gives
103- # Node 24 / npm 11.16.
106+ # Requires npm >= 11.5.1 / Node >= 22.14; `lts/*` gives Node 24 / npm 11.
104107 #
105- # NODE_AUTH_TOKEN is a temporary fallback for the window before that
106- # is configured. It is not a long-term option: per the 2026-07-08 npm
107- # changelog, 2FA-bypass tokens lose the ability to publish directly in
108- # January 2027. Delete the secret and this `env:` block once trusted
109- # publishing is live.
108+ # No NODE_AUTH_TOKEN here on purpose: setting it (even to an empty
109+ # secret) makes npm prefer token auth and skip the OIDC exchange.
110110 - name : Publish package to npm
111111 if : steps.npm_check.outputs.exists == 'false'
112112 run : npm publish --provenance --access public
113- env :
114- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
115113
116114 # The registry validates that the npm package and version exist and
117115 # that its package.json carries a matching `mcpName`. npm's read path
0 commit comments