fix: stage and validate npm releases within vip-cli - #3046
Merged
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
|
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.



VIP CLI 4.1.2 failed to publish because the bundled
cpu-featuresandssh2Linux builds introduced three hard links into the npm archive. The registry rejected it withE415: Hard link is not allowed.Keep the complete fix in vip-cli. Stable and prerelease publishing now use a repository-local action and scripts; recovery uses the same local packing helper. No changes to
Automattic/vip-actionsand no dependency on PR #416 in that repository are required.Release behavior
After building and testing, preparation hooks run in the source checkout.
rsync -awithout-Hcopies into a fresh staging directory. The helper packs once with scripts disabled, validates archive paths and package identity, rejects links, and runssmoke:releaseinside the extracted tarball. Both the dry run and actual publication use that exact.tgzwith lifecycle scripts disabled.Local publishing scripts retain release-PR file/type validation, branch and clean-checkout checks, npm trusted publishing, GitHub release/prerelease creation, selected npm tags, and the stable release's next development-version PR. Failed GitHub PR inspection stops the release. Only the captured
npm versioncommand uses silent logging; npm publication errors remain visible.Recovery saves tools from the workflow revision before checking out the existing release tag. This supports 4.1.2 without adding scripts to or changing its tag. The existing
npm-publishenvironment, workflow identity, permissions and downstream documentation jobs are preserved.Validation
Recovery after merge
Start a new run of Publish to npm (if applicable) on trunk, with
release_mode: recover-stableandrelease_version: 4.1.2. Leave the prerelease npm tag field unchanged. Recovery retains the existing GitHub release/tag. Rerunning the old failed workflow will not pick up this fix.