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

The tap-bump hooks into release.yml's publish path — the place where the .tgz is packed and attached to the GitHub Release on every Changesets publish. The original draft hooked release-tarball.yml, but that workflow became 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 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.

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:).
  • Rebased onto main (now at 0.11.0); ci: attach .tgz to GitHub Release on npm publish #152's tarball-attach work has landed, so this is no longer stacked. Includes a patch changeset so the next release publishes a new version and exercises the autobump path end-to-end.

Draft — not yet functional until the prerequisites above are met.

Generated with Goose

nahiyankhan
nahiyankhan previously approved these changes Jun 17, 2026
@chailandau chailandau dismissed nahiyankhan’s stale review June 17, 2026 13:42

The merge-base changed after approval.

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 125e232 to 95e045e Compare June 17, 2026 13:59
@chailandau chailandau marked this pull request as ready for review June 17, 2026 14:17
@chailandau chailandau marked this pull request as draft June 17, 2026 14:20
* main:
  chore: version packages
  ci: fix GitHub release tarballs
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.

2 participants