Skip to content

Stage releases on npm for approval instead of publishing them directly - #521

Merged
lehni merged 1 commit into
mainfrom
chore/staged-publish-main
Oct 18, 2026
Merged

lehni merged 1 commit into
mainfrom
chore/staged-publish-main

Conversation

@lehni

@lehni lehni commented Oct 18, 2026

Copy link
Copy Markdown

A pushed version tag now runs npm stage publish instead of npm publish: the version is uploaded to npm's stage queue, and a maintainer approves it with 2FA on npmjs.com or with npm stage approve before it can be installed. With this, the trusted publisher setting on npm can stop allowing direct publishes, so a compromised workflow can't release a version on its own.

Staged publishing needs npm 11.15.0 or later, which the workflow installs. The dist-tag is passed with --tag from publishConfig.tag, as npm stage publish isn't documented to read it.

@lehni
lehni merged commit f4c5f8c into main Oct 18, 2026
7 checks passed
@lehni
lehni deleted the chore/staged-publish-main branch October 18, 2026 15:32
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