Repository navigation
feat(npm): opt-in publishing of chosen scopes to npm.platforma.bio - #253
Merged
Merged
Conversation
…ub OIDC (draft) - publish-tarballs: npm.platforma.bio is a supported registry; each upload there gets a fresh GitHub OIDC token (audience https://npm.platforma.bio) through its own env; Verdaccio's E409 duplicate counts as published. - own-registry-scopes: maps our own-registry scopes to npm.platforma.bio in the workspace .npmrc (prepare, prepare-pnpm), so no repo lists it. - node-simple-pnpm: the upload job runs in the npm-publish environment only when something goes to npm.platforma.bio. The scope name is a placeholder (scope-tbd) until it is decided.
…he owner map does not list yet
mike-ainsel
force-pushed
the
draft/own-registry-scope
branch
from
November 20, 2026 12:08
2b9a2a9 to
9731da6
Compare
…es owners at publish time)
…the publish-time owner check
…-registry uploads
…s as a duplicate only on our registry
mike-ainsel
marked this pull request as ready for review
November 20, 2026 14:42
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
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.
Draft: do not merge yet. The registry side is live (infrastructure#669, image 1.2.3). An end-to-end test with this branch passed on prod on 2026-11-20: a test repository published existing and new
@platforma-openpackages to npm.platforma.bio, and a package owned by another repository was refused with a readable reason. Merging waits for the rollout decision.What it does
Lets a repo publish packages of chosen npm scopes to
npm.platforma.bioinstead of npmjs, with no token in the repo. The upload authenticates with the job's GitHub OIDC token.Opt-in per repo. Nothing changes unless a repo sets the new input:
Decisions
Fully gated on the opt-in input: no change for any repository that does not set it.
npm-publishenvironment step runs only when the input is set.environment: ''means "no environment"; verified on GitHub: no environment is created and no deployment is recorded.pack-unpublishedandpublish-tarballsdirectly. For it, the only change is inpublish.ts, and that change is inert for npmjs uploads (tested).Input
npm-own-registry-scopes(default empty). It is passed toprepare-pnpm(own-registry-scopes), which writes@<scope>:registry=https://npm.platforma.bio/into the job's.npmrc. Installs and publishes of that scope go to our registry; everything else (the SDK included) stays on npmjs. The actionown-registry-scopeshas no default scope, so a missing value fails loudly.One OIDC token per upload (audience
https://npm.platforma.bio). It is minted right before eachnpm publishand put only into that upload's environment, because tokens live only minutes and a release can upload many tarballs.The
npm-publishenvironment is used only when something goes to our registry. That is where the registry's allow rules look (environment:npm-publishin the OIDC subject). Repos that publish only to npmjs behave as before.No retry for new packages. The registry decides the owner at publish time (first publish, npm provenance, admin pins; verdaccio-oidc-auth#9), so there is nothing to wait for.
npm does not see GitHub's OIDC variables on uploads to our registry. npm 11 otherwise tries its own trusted-publishing exchange first, and the registry logs a refused token before every upload (seen in the end-to-end test). Unit-tested; not yet run on prod.
Scopes are accepted with or without
@('@platforma-open'or'platforma-open').E409(version already there) counts as published. This makes a re-run of a half-finished release safe.The existing step that maps
@milaboratories-pocto npm.platforma.bio is kept unchanged.Key files to review
actions/node/npm-split-publish/src/publish.ts: per-upload token..github/workflows/node-simple-pnpm.yaml: the new input, the 3prepare-pnpmcall sites, and the conditionalenvironment.actions/node/prepare-pnpm/action.yaml,actions/node/own-registry-scopes/action.yaml: the scope mapping.actions/node/npm-split-publish/test/publish.test.ts: 119 tests pass.Related drafts: infrastructure#669 (registry rules, owner pins) and verdaccio-oidc-auth#9 (owner check).