Repository navigation
Publish npm package via trusted publishing (NPM_TOKEN rejected) - #3
Merged
Merged
Conversation
npm is restricting tokens that bypass 2FA (account changes Aug 2026, direct publishing Jan 2027); the NPM_TOKEN publish for v1.0.5 was rejected (E404). Publish with GitHub OIDC instead: id-token permission on the npm job, npm CLI >= 11.5.1, and a package.json repository field matching this repo (required for provenance).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
v1.0.5npm publish failed withE404 PUT @noctusoft/ezodata-express. npm is restricting tokens that bypass 2FA: account changes began in Aug 2026, and direct token publishing ends in Jan 2027. The NuGet side of 1.0.5 published fine.What
id-token: writeand publishes with npm trusted publishing (GitHub OIDC). NoNPM_TOKENis needed, and npm records provenance automatically.npm publish. There are noworkspace:dependencies.js/package.jsongets arepositoryfield. npm requires it to match this repo for provenance.Before merging
Add the trusted publisher on npmjs.com under @noctusoft/ezodata-express → Settings → Trusted Publisher → GitHub Actions:
YOLOVibeCodeez-odata-apici.ymlThen
Tag
js-v1.0.5on the merge commit. That runs the npm-only release path, which publishes 1.0.5 without re-publishing NuGet.