Skip to content

ci(cli): build bitfun-cli per release and notify homebrew-tap#851

Open
harryfan1985 wants to merge 1 commit into
GCWing:mainfrom
harryfan1985:feat/cli-homebrew-package
Open

ci(cli): build bitfun-cli per release and notify homebrew-tap#851
harryfan1985 wants to merge 1 commit into
GCWing:mainfrom
harryfan1985:feat/cli-homebrew-package

Conversation

@harryfan1985
Copy link
Copy Markdown
Contributor

Refs #757

Adds .github/workflows/cli-package.yml which, on every published release:

  • Builds bitfun-cli natively on four runners — macos-15 (arm64), macos-15-intel (x86_64), ubuntu-latest (x86_64), ubuntu-24.04-arm (aarch64) — avoiding cross-compilation entirely.
  • Runs --version and --help smoke tests to catch dynamic-linker / missing-lib failures before publishing.
  • Packages each build as bitfun-cli-<version>-<rust-target>.tar.gz (binary + LICENSE + README + themes/ + prompts/), generates a per-archive .sha256 and a combined SHA256SUMS.
  • Uploads everything to the corresponding GitHub Release via softprops/action-gh-release@v2.
  • Fires a repository_dispatch to GCWing/homebrew-tap so the bitfun-cli formula can auto-bump. Safe no-op when HOMEBREW_TAP_DISPATCH_TOKEN is not configured — forks and the pre-tap window are unaffected.

The workflow shape (triggers, prepare job, version-resolution logic, concurrency group naming) mirrors the existing desktop-package.yml for consistency.

Why prebuilt binaries (not a from-source brew formula)

bitfun-cli pulls in the full bitfun-core workspace via the product-full feature. A from-source brew install would take 5–10 minutes per user and require a Rust toolchain — unfriendly for terminal users. Shipping prebuilt tarballs keeps brew install bitfun-cli near-instant.

Smoke-test plan after merge

  1. Trigger via workflow_dispatch with tag_name=v0.2.7 and upload_to_release=false to validate the four-target matrix without touching the release.
  2. Once green, configure HOMEBREW_TAP_DISPATCH_TOKEN in repo secrets and push the prepared GCWing/homebrew-tap repo.
  3. Validate end-to-end on the next real release: release published → 4 tarballs uploaded → tap auto-bump PR opened.

Related (separate repo, not in this PR)

  • GCWing/homebrew-tap formula + bump workflow are prepared and pending push to the new tap repo.
  • homebrew-core submission deferred per the issue plan, gated on 1.0.0 + adoption.

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