Skip to content

publish_npm: use Trusted Publishing (OIDC) for auth, not NPM_TOKEN#700

Merged
1technophile merged 1 commit into
developmentfrom
fix/npm-trusted-publishing
Jun 6, 2026
Merged

publish_npm: use Trusted Publishing (OIDC) for auth, not NPM_TOKEN#700
1technophile merged 1 commit into
developmentfrom
fix/npm-trusted-publishing

Conversation

@1technophile

Copy link
Copy Markdown
Member

Summary

  • Trusted Publishing is now configured on npmjs.org for theengs-decoder (repo theengs/decoder, workflow publish_npm.yml).
  • The v2.3.0 publish (run) still returned 404 Not Found - PUT https://registry.npmjs.org/theengs-decoder even though the provenance statement was signed successfully. Two causes:
    • Node 20 ships with npm 10.x. On npm < 11.5.1, OIDC is used only for provenance attestation; authentication still falls back to NODE_AUTH_TOKEN. With NPM_TOKEN no longer valid (since Trusted Publishing replaced it), the PUT was unauthorized → 404.
    • Full OIDC auth for npm publish requires npm 11.5.1+.
  • Upgrade npm to latest before publish, and remove the NODE_AUTH_TOKEN env from the two publish steps so the CLI uses the Trusted Publisher flow end-to-end.
  • Once this merges, the NPM_TOKEN secret can be deleted from the repo.

Test plan

  • After merge, trigger Publish to npm via workflow_dispatch with the version input set to 2.3.0 (or re-publish the v2.3.0 release) and confirm both theengs-decoder@2.3.0 and node-red-contrib-theengs-decoder@2.3.0 appear on npm with provenance.

🤖 Generated with Claude Code

Trusted Publishing is now configured on npmjs.org for theengs-decoder
(repo: theengs/decoder, workflow: publish_npm.yml). The v2.3.0 publish
still returned 404 because:

- Node 20 ships with npm 10.x, which only uses OIDC for provenance
  attestation. Authentication still relied on NODE_AUTH_TOKEN, and the
  NPM_TOKEN secret is no longer valid, so PUT was rejected.
- Full OIDC auth for npm publish requires npm 11.5.1+.

Upgrade npm to latest before publishing, and drop the NODE_AUTH_TOKEN
env from the publish steps so the CLI uses the Trusted Publisher flow
end-to-end. The NPM_TOKEN secret can be removed from the repo once
this lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@1technophile 1technophile merged commit 89a7f6d into development Jun 6, 2026
16 checks passed
@1technophile 1technophile deleted the fix/npm-trusted-publishing branch June 6, 2026 00:36
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