Repository navigation
Stage the first npm release of a new package instead of refusing it - #91
Merged
colinjlacy merged 1 commit intoNov 30, 2026
Merged
Conversation
npm accepts a trusted publisher only for a package that already exists, so the first version of a new package could not be published by this workflow, and publish-all stopped any real run that included one. Eight packages are waiting on this: aws-secrets-manager, aws-sqs, cql, file-system, gpu, kafka-service, observability and rabbitmq-service. npm's staged publishing fills that gap. publish-npm.py now asks npm about each package before publishing any: - already on npm: published with trusted publishing, as before - not on npm: staged with the stage-only token in NPM_STAGE_TOKEN; staging needs no 2FA and publishes nothing until a maintainer approves the staged version on npmjs.com with 2FA - only the 0.0.0-stage placeholder: a staged first release is waiting for approval, so it is skipped When a package needs staging and the token is not set, the run stops before building or publishing anything. After approval, a maintainer adds a trusted publisher to the package, and later releases use trusted publishing. The workflow installs npm 11.15.0, which staged publishing needs, and passes the token only to the publish step. publish-all now reports a first npm release as staged instead of blocking the run.
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.
npm accepts a trusted publisher only for a package that already exists, so our workflow could not publish the first version of a new package, and publish-all stopped any real run that included one. Eight packages are waiting on this: aws-secrets-manager, aws-sqs, cql, file-system, gpu, kafka-service, observability and rabbitmq-service.
This uses npm's staged publishing for that first version. Before publishing anything, publish-npm.py checks each package on npm:
After approval, a maintainer adds a trusted publisher to the package with npm trust, and later releases use trusted publishing. The token stays for the next new extension; it can only stage, so nothing goes live without 2FA approval. Publishing with tokens directly ends in January 2027, but staging with a token stays supported.
New tests cover staging, the missing-token stop, the waiting placeholder and the npm lookup.