chore(release): make release.sh idempotent, merge via auto-merge, retire the release skill#650
Merged
Conversation
Remove the two non-actionable confirm() prompts (Proceed?, Push tag?)
that interrupted the flow without offering a meaningful decision.
Fix the homebrew-tap merge failure: wait_for_approval_and_merge now
enables auto-merge (--auto) instead of a plain merge, so approving while
required checks are still pending no longer errors ("base branch policy
prohibits the merge"). It tolerates the reviewer enabling auto-merge by
hand, then polls until the PR actually lands. Because it sits through CI
itself, steps 1 and 6 no longer pre-wait for checks — you can approve
immediately. The wait ends only once checks conclude without merging
(likely a failed required check) or an absolute backstop.
Make each publish step skip-if-done and pick up in-flight work:
- npm: skip if the version is already on the registry, else watch an
in-flight run or dispatch one.
- homebrew: skip if the formula is already bumped, watch an existing
update PR, else dispatch the workflow and wait for its PR to merge.
- docs: skip if versions.json already lists the minor, watch an existing
docs PR, else deploy + open + merge as before.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens and centralizes the release workflow in scripts/release.sh.
Changes:
- Adds resumable npm, Homebrew, docs, and PR automation.
- Enables approval-first auto-merge handling.
- Retires the legacy release skill and permits bot docs-version updates.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/release.sh |
Adds idempotency probes and auto-merge polling. |
.github/repo_policies/BOT_APPROVED_FILES |
Allows bot updates to docs versions. |
.claude/skills/release/SKILL.md |
Removes the legacy skill entry point. |
.claude/skills/release/task1-bump-pr.md |
Removes bump-PR instructions. |
.claude/skills/release/task2-tag.md |
Removes tagging instructions. |
.claude/skills/release/task3-release-wf.md |
Removes release-monitoring instructions. |
.claude/skills/release/task4-npm.md |
Removes npm publishing instructions. |
.claude/skills/release/task5-tap.md |
Removes tap publishing instructions. |
.claude/skills/release/task6-docs.md |
Removes docs release instructions. |
.claude/skills/release/task7-homebrew-core.md |
Removes Homebrew core status instructions. |
.claude/skills/release/rollback.md |
Removes legacy rollback guidance. |
Comments suppressed due to low confidence (1)
.claude/skills/release/SKILL.md:1
- Deleting this release entry point removes beta-release automation, but
scripts/release.shonly accepts stableX.Y.Zversions while this skill acceptedX.Y.Z-beta.Nand passed the npm beta flag. The PR describes the script as superseding the skill without stating that beta releases are being retired, so retain a beta-capable path or add equivalent support before removing the skill.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes from Copilot review on #650: - Tag step: reuse a local tag left behind when a previous run created it but failed to push, after checking it points at the release commit; bail if it points elsewhere. Previously a rerun died on "tag already exists". - ensure_release_pr: if a release-pr.yml run is still opening the PR, watch that run before dispatching another, so two runs don't race to force-push/create the same branch. - npm step: after ensure_workflow_run (which matches on workflow, not version) verify the version actually landed on npm, so watching an unrelated in-flight run can't be mistaken for a successful publish. - publish-all.sh: skip any package whose version is already on the registry. A run that failed after publishing some platform packages but before the main package now resumes instead of erroring with 403 ("cannot publish over the previously published version"). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lwshang
marked this pull request as ready for review
July 15, 2026 20:36
lwshang
enabled auto-merge (squash)
July 15, 2026 20:36
adamspofford-dfinity
approved these changes
Jul 16, 2026
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.
This PR must merge before #649 ("chore: update docs site to v1.1", branch
release/docs-v1.1.0).#649 is a bot-authored PR that edits
docs-site/versions.json, and it is currently blocked: the approved-files CI check fails because that path isn't in.github/repo_policies/BOT_APPROVED_FILES. This PR adds it. Once this lands onmain, re-run #649's checks and it will pass, unblocking the v1.1 docs update.Summary
Hardening for the release flow, driven by friction hit during the v1.1.0 release.
confirm()calls (Proceed?,Push tag?) that interrupted the flow without offering a decision the driver could act on.wait_for_approval_and_mergenow enables auto-merge (gh pr merge --auto) instead of a plain merge. Approving while required checks are still pending no longer errors with "the base branch policy prohibits the merge" (the failure seen onhomebrew-tap#44). It also tolerates the reviewer enabling auto-merge by hand, then polls until the PR actually lands.versions.jsonalready lists the minor; watch an existing docs PR; else deploy + open + merge as before.docs-site/versions.jsontoBOT_APPROVED_FILESso the bot-authored docs-versions PR passes the approved-files check (this blocked step 6 during v1.1.0)..claude/skills/release/*is superseded byscripts/release.shand removed to avoid two drifting sources of truth.Testing
bash -n scripts/release.shpasses.gh/curl/awkprobe added to the script (npm registry check, formula version read, ongoing-run lookup,gh pr checks --json bucket,autoMergeRequest,gh pr viewby deleted branch) was validated against the live repos.🤖 Generated with Claude Code