Skip to content

chore: auto-bump Homebrew tap on release#150

Draft
chailandau wants to merge 4 commits into
mainfrom
chore/homebrew-tap-autobump
Draft

chore: auto-bump Homebrew tap on release#150
chailandau wants to merge 4 commits into
mainfrom
chore/homebrew-tap-autobump

Conversation

@chailandau

@chailandau chailandau commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

What

Auto-bump the OSS Homebrew tap (block/homebrew-tap) whenever @anarchitecture/ghost is published, so brew install block/tap/ghost tracks releases without manual formula edits.

Why

Today the ghost formula version is bumped manually. This wires the release into the standard Block OSS auto-bump flow.

How

Stacked on #152. This branch is rebased onto chai/release-attach-tarball. Merge #152 first.

The tap-bump hooks into release.yml's publish path — the place where, after #152, the .tgz is packed and attached to the GitHub Release on every Changesets publish. The original draft hooked release-tarball.yml, but #152 made that workflow a dispatch-only manual fallback, so the autobump moved to release.yml to fire on every real release.

Steps added to release.yml (all gated on steps.changesets.outputs.published == 'true'):

  1. Attach tarball (from ci: attach .tgz to GitHub Release on npm publish #152) now also exports tag/sha256/artifact_url as step outputs.
  2. Generate token for tap release — mints a scoped GitHub App token for block/homebrew-tap.
  3. Trigger Homebrew formula bumpgh workflow run bump-formula.yaml --repo block/homebrew-tap with repo/formula/tag/artifact_url/sha256.

blockblock only — no Square/internal references.

Prerequisites before this works

  • BLOCK_HOMEBREW_TAP_APP_ID / BLOCK_HOMEBREW_TAP_PRIVATE_KEY secrets available to this repo (GitHub App installed on block/ghost). Both bump steps are gated on env.HAS_TAP_APP and the publish flag, so forks and unconfigured environments skip cleanly — safe to merge before onboarding completes.
  • Formula/ghost.rb added to block/homebrew-tap (separate PR) so there's a formula to bump. Pin it at the current published version (0.10.0), not the stale 0.8.0 placeholder.

Notes

  • id-token: write already present on release.yml for provenance; reused for the App token mint.
  • Gated on env.HAS_TAP_APP (the secrets context can't be used directly in step-level if:).

Draft — not yet functional until prerequisites above are met and #152 lands.

When the Changesets 'version packages' PR is merged, release.yml publishes
to npm and creates the GitHub Release. This adds a step, gated on the
action's published output, that packs @anarchitecture/ghost and uploads the
tarball to that same Release so the GitHub Release tarball channel stays in
sync with npm without a separate tag push.
Mirror block/sessh: after publishing the release tarball, mint a scoped
GitHub App token for block/homebrew-tap and dispatch its bump-formula.yaml
so each anarchitecture-ghost@X.Y.Z release auto-opens a formula bump PR.

Gated on BLOCK_HOMEBREW_TAP_APP_ID so forks/unconfigured repos skip it.
Move the tap-bump from the now dispatch-only release-tarball.yml onto
release.yml's automatic publish path, so brew install block/tap/ghost
tracks every npm release. Gated on an actual Changesets publish and the
BLOCK_HOMEBREW_TAP_* secrets.
@chailandau chailandau force-pushed the chore/homebrew-tap-autobump branch from 0561e57 to 125e232 Compare June 16, 2026 22:04
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.

1 participant