Repository navigation
Release: publish only the npm versions that are missing - #23
Merged
Merged
Conversation
The publish step now publishes each package version npm does not have yet and skips a version npm already serves with the same contents, so a release run that stopped half way can simply run again. A version npm serves with other contents fails the run with its name. Publishing keeps provenance through npm trusted publishing (OIDC), with no npm token in the repository.
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.
The release workflow's npm publish step now publishes only the package versions npm does not have yet.
.github/scripts/npm-publish-new.mjsreads each public package's version from the registry: a missing version is published with provenance; a version npm already serves with the same contents (the samenpm packintegrity) is skipped and listed inalready-published.json; a version npm serves with other contents fails the run with its name.id-token: write) withNPM_CONFIG_PROVENANCE; no npm token is stored.This is a merge only: no version change, no tag.
Evidence
npm packintegrity reproduces npm'sdist.integrityon two real releases (foundations-cli 0.2.1 from its tag; @reneza/skillgate 0.16.1 afternpm ciand its build), so a retry recognises what is already published.node --check; the checks below run on this branch.Door
Two-way: revert this commit; nothing runs until the next release tag or a manual run.
Blast radius
.github/workflows/release.ymland.github/scripts/only; the next tagged release's npm publish step. No package code, no CI workflow, no version.