feat: ship rulesync via a self-contained Homebrew tap#2221
Merged
Conversation
Add an in-repo Homebrew tap so users can install the prebuilt binary from our own tap with same-minute availability, instead of relying solely on the homebrew-core formula bump. - Add Formula/rulesync.rb, a binary formula that downloads the per-platform release asset (macOS/Linux, arm64/x64) with no node runtime dependency. - Add scripts/generate-homebrew-formula.ts (with tests) to render the formula from a version and the release SHA256SUMS. - Replace the homebrew-core bump job in publish.yml with a job that regenerates the formula on release and opens an auto-merge PR to update it on main. - Document the two-argument `brew tap <name> <url>` install flow in README and the installation docs. Closes #2218
- Checkout the repo with persist-credentials: false so the formula token is not left in the runner's git config during pnpm install / tsx; authenticate the branch push explicitly instead. - Reuse an existing open PR for the formula branch so re-running the job for the same tag is idempotent rather than failing in gh pr create.
Owner
Author
|
@dyoshikawa Thank you! |
Merged
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
Ships rulesync via a self-contained Homebrew tap inside this repository (no separate
homebrew-*repo), so users can install the prebuilt binary from our own tap with same-minute availability and full control over the formula.Resolves #2218.
Design decisions (from the issue's open questions)
Formula/rulesync.rbdownloads the per-platform release asset (rulesync-{darwin,linux}-{arm64,x64}) thatpublish-assets.ymlalready builds, so it needs nonoderuntime and installs instantly.publish.ymlis removed; the tap is now the maintained Homebrew path.homebrewjob regenerates the formula from the releaseSHA256SUMSand opens an auto-merge PR againstmain, respecting branch protection.Changes
Formula/rulesync.rb— binary formula (initialized with the real v9.6.3 checksums).scripts/generate-homebrew-formula.ts(+ tests) — renders the formula from a version and the releaseSHA256SUMS; validates the version and fails when any platform checksum is missing..github/workflows/publish.yml— replaces the homebrew-corebrew bump-formula-prjob with a job that downloads the release checksums, regenerates the formula, and opens an auto-merge PR.README.md/docs/getting-started/installation.md(+ syncedskills/rulesync/) — document the two-argumentbrew tap <name> <url>+brew installflow.Install flow
Notes / caveats
homebrewjob's checkout and PR usesecrets.HOMEBREW_FORMULA_TOKENwhen present, falling back toGITHUB_TOKEN. Because a branch-protectedmainwill not let aGITHUB_TOKEN-authored PR trigger required checks (and therefore auto-merge), a maintainer PAT is recommended; without it the formula PR is left open for a manual merge (the job logs a warning rather than failing).release/v*PR merges, so it is not exercised by this PR's CI — only YAML/lint validity is checked here.🤖 Generated with Claude Code