You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support npm staged publishing in changeset publish #2025
npm recently added staged publishing via npm stage publish in npm CLI 11.15.0. This lets CI submit a package version to npm without making it public immediately. A maintainer can then review the staged package and explicitly approve it with 2FA before it goes live.
Today, changeset publish only supports immediate publishing through normal package-manager publishing. In a Changesets monorepo, teams who want npm staged publishing need custom scripting for package selection, publish dirs, access/tag handling, ignored/private packages, and post-approval tagging.
Add first-class support for npm staged publishing.
Possible API:
changeset publish --stage
or:
changeset publish --publish-mode=stage
When enabled, Changesets would use npm stage publish instead of immediate publishing for packages that need publishing.
The staged mode should probably avoid creating git tags during the staging step, because a staged package is not live yet and may be rejected. A safe flow would be:
If you want to use staged publishing and are using GitHub Actions, you can do this with a custom publish script. You can't run it inline though, because the changesets action runs the command in execa and not in a shell.
#!/bin/bash# npm
npm stage publish --json \
| jq --compact-output '.[] | {type: "git-tag", tag: .id, packageName: .name}'>$CHANGESETS_OUTPUT# pnpm# Unfortunately, pnpm outputs messages on stdout and not stderr like npm, so if# you want meaningful error messages, you will have to run publish twice
pnpm stage publish --recursive --reporter silent --json --dry-run \
| jq --compact-output '.[] | {type: "git-tag", tag: .id, packageName: .name}'>$CHANGESETS_OUTPUT
pnpm stage publish
If you're using pnpm specifically, you can also do this using pnpm-publish-summary.json:
Are there any proposals/thoughts on how you'd want to model and support staged publishing in changesets natively? Would be happy to contribute to this if there is.
Activity
Andarist commentedon May 21, 2026
Hey, this is very much on my mind and I'm figuring out how ot best support this and related workflows.
In the meantime, I recommend using a split workflow like the one we currently have here: https://github.com/changesets/changesets/blob/372523f4c2ee4ffeb8330d444d47ffb6d0af5126/.github/workflows/publish.yml
This one should be configured together with a manual environment approval.
run `npm stage publish` instead of `npm publish` in changesets (#13245)
ci(release): tag after verified approval, not at stage time
ci(release): gate public release signals behind npm approval
fix(ci): declare least-privilege permissions and pin the release envi…
fix(ci): declare least-privilege permissions and pin the release envi…
fix(ci): declare least-privilege permissions and pin the release envi…
feat(github-settings-as-code): manage the default workflow permissions (
ci: stage releases on npm for a maintainer to approve with 2FA (#22)
jeremy-code commentedon Oct 4, 2026
If you want to use staged publishing and are using GitHub Actions, you can do this with a custom publish script. You can't run it inline though, because the changesets action runs the command in execa and not in a shell.
If you're using pnpm specifically, you can also do this using
pnpm-publish-summary.json:rexxars commentedon Oct 12, 2026
Are there any proposals/thoughts on how you'd want to model and support staged publishing in changesets natively? Would be happy to contribute to this if there is.
evenstensberg commentedon Oct 14, 2026
Interested in trying out and giving feedback from a webpack pov when there's a way for staged publishing to work with changesets.
For now, we've added OICD on npm and allowing npm publish so that the changeset doesn't fail on publish