fix(release): make publish recovery idempotent#15
Merged
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughA new manual workflow validates a release tag, installs dependencies, runs the release publish script with npm publishing skipped, and creates a GitHub Release if needed. The publish script now skips npm or JSR publishes when versions already exist or skip flags are set. ChangesRecover Release flow
Sequence Diagram(s)sequenceDiagram
participant PublishScript as scripts/release/publish.mjs
participant NpmRegistry as npm registry
participant JsrRegistry as JSR registry
PublishScript->>NpmRegistry: npm view name@version --json
NpmRegistry-->>PublishScript: published version or 404
PublishScript->>JsrRegistry: GET /@scope/name/meta.json
JsrRegistry-->>PublishScript: package version metadata or 404
sequenceDiagram
participant Runner as GitHub Actions runner
participant ReleaseScript as scripts/release/publish.mjs
participant GhCli as gh release
participant GitHubReleases as GitHub Releases
Runner->>ReleaseScript: pnpm release:publish with SKIP_NPM_PUBLISH=1
ReleaseScript-->>Runner: publish complete
Runner->>GhCli: gh release view TAG
alt release missing
Runner->>GhCli: gh release create --verify-tag --generate-notes TAG
GhCli->>GitHubReleases: create release for TAG
else release exists
GhCli-->>Runner: existing release
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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
SKIP_NPM_PUBLISH/SKIP_JSR_PUBLISHrecovery switchesv0.10.4Why
The
v0.10.4tag published npm successfully, then JSR returned429 Too Many Requests. A naive rerun would likely fail on already-published npm versions before it can retry JSR.Validation
Summary by CodeRabbit
New Features
Bug Fixes