Skip to content

feat: move Homebrew formula update from CI job into goal-release flow#2273

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-2271-homebrew-release-flow
Jul 16, 2026
Merged

feat: move Homebrew formula update from CI job into goal-release flow#2273
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-2271-homebrew-release-flow

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Closes #2271

Moves the Homebrew tap formula update out of the dedicated homebrew CI job in .github/workflows/publish.yml and into the /goal-release command flow (direction 2 from the issue: keep asset building in CI, move the formula update into the release flow driven by the AI).

Changes

  • .rulesync/commands/goal-release.md: adds a new Step 5 "Update the Homebrew Formula". After the release PR merges, the command waits for the Publish Assets workflow run to succeed, downloads the release's SHA256SUMS, regenerates Formula/rulesync.rb with scripts/generate-homebrew-formula.ts, and — because main is branch-protected (the pull_request rule blocks direct pushes even for admins; the admin bypass is bypass_mode: pull_request) — lands the change via a PR that is merged immediately with gh pr merge --admin --merge --delete-branch. Skips cleanly when the formula is already up to date, and refuses to commit anything other than Formula/rulesync.rb.
  • .rulesync/skills/draft-release/SKILL.md: adds a note that the formula is intentionally not updated at draft time (the checksums only exist after Publish Assets runs) and points manual-release users at the post-merge step.
  • .github/workflows/publish.yml: removes the homebrew job (checksum download, formula regeneration, homebrew-formula/<tag> branch push, auto-merge PR, and the HOMEBREW_FORMULA_TOKEN credential handling), leaving a pointer comment. The publish job is unchanged.
  • scripts/generate-homebrew-formula.ts / Formula/rulesync.rb: update the generated header comment to reference the new flow instead of the removed CI job. The generator itself stays the single source of formula generation logic.

Why this shape

The issue's key constraint is that the formula embeds sha256 checksums of release binaries that only exist after the release PR merges and publish-assets.yml uploads them, so the formula cannot land in the release PR itself (direction 1 would require byte-identical local rebuilds — fragile). Direction 2 was chosen: the formula update becomes a synchronous, AI-driven step of /goal-release. Compared to the old CI job this removes the HOMEBREW_FORMULA_TOKEN dependency, the auto-merge failure mode, and the out-of-band job complexity; the remaining PR is created and merged immediately within the release flow (a direct push to main is not possible under the branch ruleset).

Notes

  • Generated command/skill outputs (.claude/, .opencode/, etc.) are gitignored; only the .rulesync/ sources are tracked, and pnpm generate was run.
  • pnpm cicheck passes (7059 tests, content checks green).

🤖 Generated with Claude Code

cm-dyoshikawa and others added 2 commits July 15, 2026 18:46
Closes #2271

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Wait for the release to be published (not draft) before merging the
  formula, restoring the ordering guarantee of the removed needs: publish
  gate (draft asset URLs 404 for unauthenticated users)
- Filter the Publish Assets run list by the release branch and poll until
  the run appears
- Document branch/PR reuse for re-runs of the formula step
- Reword installation docs: formula is updated as part of each release

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dyoshikawa
dyoshikawa merged commit 2843177 into main Jul 16, 2026
11 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-scrap-issue-2271-homebrew-release-flow branch July 16, 2026 02:20
@dyoshikawa

Copy link
Copy Markdown
Owner Author

Thanks! Merged as part of the automated /goal-pr flow. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Homebrew formula update from a separate CI PR into the draft-release skill

2 participants