ci(publish): adopt npm staged publishing on v0.x#10936
Merged
Merged
Conversation
Switch the v0.x publish workflow to `npm stage publish` so a maintainer must approve each release from npm's stage queue (2FA proof-of-presence) before it becomes installable, even for non-interactive OIDC CI publishes. Mirrors the staged-publishing model upstream adopted on v1.x (axios#10926). Pin npm to 11.15.0 explicitly: Node 24/26 currently bundle npm 11.13.0, below the 11.15.0 minimum that `npm stage publish` requires.
3 tasks
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.
Summary
Adopts staged publishing for
v0.xreleases. See #10926 and #10935 for reference.NOTE: This (along with #10926) depends on a one-time, owner-only change to axios' npm Trusted Publisher settings. The publisher predates npm's staged-publishing rollout, so its Allowed actions currently permits only
npm publish; untilnpm stage publishis enabled there, OIDC publishes will fail with an HTTP 403 error. (Since Trusted Publishing is configured on a project/repository level, not on a branch level, enabling it once covers both branches; if it was enabled with #10926 then this should already be covered :D. See https://docs.npmjs.com/trusted-publishers#for-github-actions for more info.Once both the v0.x and v1.x release workflows are on npm stage publish, I'd also recommend unselecting
npm publishfrom the "Allowed actions" to make staging mandatory for all OIDC publishes.Summary by cubic
Switches the
v0.xrelease workflow tonpm stage publishso each release is staged and must be approved before going live. Pinsnpmto11.15.0in CI until Node ships a compatible version.Description
npm publishwithnpm stage publish --provenance --access public --tag v0x.npm@11.15.0(minimum for staged publishing).v0.xwith the staged model used onv1.x.npm stage publishor publishes will 403.npm publishto make staging mandatory.Docs
/docs/with thev0.xrelease flow:npm@11.15.0pin and removal criteria.Testing
Semantic version impact
Written for commit e966fc9. Summary will update on new commits. Review in cubic