chore(release): four-script release flow with manual publish fallback#153
Conversation
scripts/release_prepare.sh, release_push_and_pr.sh, release_merge_and_tag.sh, release_publish_manual.sh + scripts/RELEASE.md runbook. Stages: local prep, push and PR open, watch CI and merge, re-tag at merged SHA, manual publish fallback for when GH Actions is broken. Push remains gated at three points. Tags against origin/main directly to sidestep squash-merge divergence.
|
Warning Review limit reached
More reviews will be available in 15 minutes and 48 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Four scripts under
scripts/plus a runbook atscripts/RELEASE.md.Lifts the release pattern actually used in v0.39.1 (#150) and v0.39.2
(#151) so the next dozen releases don't get pasted by hand.
Scripts
scripts/release_prepare.sh <VERSION> [CO_TAG]: verifies thepre-flight files exist (
.commit_msg_v<VERSION>_release.txt,.pr_body_v<VERSION>.md, CHANGELOG entry), bumps the three versionfiles, runs ruff + full pytest (deselects the pre-existing SSRF
test), stages explicit paths only, commits via
-F, creates bothannotated tags, creates
release/v<VERSION>branch. Stops beforepush.
scripts/release_push_and_pr.sh <VERSION>: pushes the releasebranch (your keystroke), opens the PR using the commit subject as
PR title and
.pr_body_v<VERSION>.mdas body.scripts/release_merge_and_tag.sh <PR_NUMBER> <VERSION> [CO_TAG]:gh pr checks --watch --required, squash-merge, fetch the mergedcommit, re-tag at
origin/main(sidesteps squash-merge divergencewithout
git reset --hard), print the gated tag-push command.scripts/release_publish_manual.sh <VERSION>: PyPI via twine + npmpublish
--no-provenancefallback when the GH Actions Releaseworkflow itself is broken. Behind a typed-version confirmation.
Use only when the workflow cannot run, not for transient infra
noise (wait + rerun the workflow in that case).
Gated keystrokes preserved
The release flow keeps three gated keystrokes: branch push, tag push,
and manual PyPI upload. Everything else is one invocation per stage.
Tagging strategy
The re-tag step uses
git tag -a v<VERSION> origin/mainrather thanchecking out main and tagging HEAD. Squash-merge writes a new commit
on remote main that does not match the pre-merge local SHA; tagging
against
origin/maindirectly avoids needing agit reset --hard(which is on the destructive-ops list) to sync local main first.
Test plan
scripts/release_prepare.shend-to-end and the pasted-command count drops from ~12 to ~3
(branch push, tag push, optional local-main reconciliation)