fix(release): isolate npm publish credentials - #82
Merged
Conversation
|
馃帀 Congratulations on making your first pull request in '@gstj/safe-jsx'! We appreciate your contribution and will review it as soon as possible. Thank you for helping us make this project better. |
Owner
Author
|
Local proof from 9d82c4f. The transcript covers the full suite, release rejection cases, registry guard, actionlint, package build, and local tarball dry run. The dry run executes no lifecycle scripts and reaches npm's already-published check for 1.3.8. |
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.

Summary
Releases now validate their metadata and ancestry before publishing the verified tarball produced by the build job.
Details
mainand rejects a release when its ref, event SHA, annotated tag, package version, changelog section, tag annotation, release body, ormainancestry disagree.npm publish ./release-artifact/*.tgz --ignore-scripts.safe-publish-latestexplicitly in publish mode before building the tarball.Testing steps
Install and audit the locked dependencies.
pnpm install --frozen-lockfile && pnpm audit --audit-level=lowConfirm the install completes and the audit reports no known vulnerabilities.
Run the repository checks.
Confirm every command exits successfully.
Validate the workflow.
Confirm it reports no workflow errors.
Exercise the registry guard against the current package version.
pnpm exec safe-publish-latest --force-in-publishConfirm it exits with code 3 because 1.3.8 is already published.
Pack the project without lifecycle scripts.
Confirm npm creates the package tarball.
From the same shell, dry-run the local tarball publish.
Confirm npm reads the local package, runs no lifecycle scripts, and stops only because 1.3.8 already exists.