Skip to content

Stage npm releases for maintainer approval - #71

Merged
ats3v merged 1 commit into
mainfrom
npm-staged-publishing
Nov 12, 2026
Merged

ats3v merged 1 commit into
mainfrom
npm-staged-publishing

Conversation

@ats3v

@ats3v ats3v commented Nov 12, 2026

Copy link
Copy Markdown
Member

Releases now go through npm's staged publishing: the release job only stages the version, and it goes live once a package maintainer approves it with 2FA, on npmjs.com or with npm stage approve. With direct publishing, anyone who can create a GitHub release here can ship a new version of the SDK. npm recommends stage-only for trusted publishers.

  • deploy.yml runs npm stage publish, with verbose logging because npm logs trusted-publishing errors only at that level.
  • The NPM_TOKEN fallback is removed. npm uses trusted publishing whenever it works, and that token, from 2024, is the one the 2.1.0 publish failed with.
  • RELEASE.MD gets the approval step.

Checked with npm 11.19.1, which Node 24 bundles: npm stage publish --dry-run with the workflow's flags stages deepinfra@2.2.0 (155 files), and npm stage publish goes through the same trusted-publishing sign-in and provenance code as npm publish.

To finish the switch on npm, untick npm publish on the trusted publisher before the release. Once a release has gone through, set the package's Publishing access to "Require two-factor authentication and disallow tokens".

@ats3v
ats3v merged commit 4fdf685 into main Nov 12, 2026
6 checks passed
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.

2 participants