Repository navigation
ci(publish): stage releases on npm and approve them with 2FA - #244
Merged
Merged
Conversation
The package's trusted publisher on npmjs.com only allows staged publishing, so CI's plain npm publish has been rejected since 3.49.25 (E403 OIDC permission denied for this action). Keep that restriction: CI now runs npm stage publish, and a version goes live only after a maintainer approves it with 2FA. A compromised workflow or release permission can no longer ship a build to users on its own. Drop the NPM_TOKEN fallback from the publish step; trusted publishing needs no long-lived token.
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.
CI publish has failed since 3.49.25 with
E403 OIDC permission denied for this action(runs 42499967519, 42574370607). The trusted publisher for@blockrun/franklin(BlockRunAI/Franklin + publish.yml) is allowed to stage only, pernpm trust list.This keeps that restriction and switches CI to
npm stage publish --provenance --access public(npm >= 11.20). A release now stages the version; it goes live afternpm stage approve <stage-id>with 2FA. The job summary prints the approve commands. TheNPM_TOKENfallback is removed from the publish step.CONTRIBUTING.md documents the approve step.
Verified locally:
npm stage publish --provenance --access public --dry-runaccepts the flags (it stops only because 3.49.26 already exists). The real OIDC path is exercised on the next release.