Skip to content

Follow npm's documented OIDC publish setup - #4

Merged
mwagena merged 1 commit into
1.xfrom
f/mw/setup-node-v7
Sep 9, 2026
Merged

mwagena merged 1 commit into
1.xfrom
f/mw/setup-node-v7

Conversation

@mwagena

@mwagena mwagena commented Sep 9, 2026

Copy link
Copy Markdown
Member

The v1.1.4 run failed with ENEEDAUTH — need auth This command requires you to be logged in to https://registry.npmjs.org/. Removing registry-url in #3 did clear the _authToken placeholder that caused the earlier E404, but it also left npm without a configured registry to run the OIDC exchange against, so it fell back to asking for a login.

npm's documented setup keeps registry-url and moves setup-node to v7, whose changelog states outright that "npm Trusted Publishing (OIDC) is not affected, since it does not use NODE_AUTH_TOKEN" — v7 no longer writes the token line when no secret is present, which is what v5 got wrong.

Changes:

  • actions/setup-node@v5@v7
  • restores registry-url: https://registry.npmjs.org
  • package-manager-cache: false, per npm's guidance that a poisoned cache can expose the OIDC token
  • drops npm install -g npm@latest; it resolved to npm 12.0.2, and the npm bundled with the pinned Node LTS already clears the 11.5.1 minimum
  • adds a node -v && npm -v step, since neither failing run showed which npm actually ran

Test path

Tag v1.1.5 on 1.x after merge. Confirm the publish job succeeds, npm view @concept7/kite version reports 1.1.5, and the release shows a provenance attestation.

🤖 Generated with Claude Code

Dropping registry-url removed the placeholder token but left npm with no
registry to run the OIDC exchange against, so it asked for a login instead.
npm's own guidance keeps registry-url and relies on setup-node v7, which no
longer writes the _authToken line when no NODE_AUTH_TOKEN exists. The cache
is off because a poisoned package-manager cache can expose the OIDC token,
and the bundled npm from the pinned Node already exceeds the 11.5.1 minimum.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mwagena mwagena self-assigned this Sep 9, 2026
@mwagena
mwagena merged commit 8e53efc into 1.x Sep 9, 2026
1 check passed
@mwagena
mwagena deleted the f/mw/setup-node-v7 branch September 9, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant