Skip to content

feat(brew): add Homebrew tap packaging and release workflow#118

Merged
odesenfans merged 1 commit into
mainfrom
feat/brew-packaging
Mar 23, 2026
Merged

feat(brew): add Homebrew tap packaging and release workflow#118
odesenfans merged 1 commit into
mainfrom
feat/brew-packaging

Conversation

@odesenfans
Copy link
Copy Markdown
Contributor

Add formula template, a publish-brew job in the release workflow (with dedicated GitHub environment), and a local test script for macOS validation.

Add formula template, a publish-brew job in the release workflow
(with dedicated GitHub environment), and a local test script for
macOS validation.
Copy link
Copy Markdown

@foxpatch-aleph foxpatch-aleph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a well-structured Homebrew tap integration with formula template, CI workflow, and local testing. The workflow properly depends on binary builds, uses environment-scoped secrets, and includes verification steps. The formula template follows Homebrew conventions. Two minor improvements suggested: use idiomatic Homebrew DSL in the install block and improve signal handling in the test script.

packaging/brew/formula.rb.tmpl (line 18): Consider using on_arm? instead of Hardware::CPU.arm? for consistency with the on_arm/on_intel blocks above. The idiomatic Homebrew DSL would be:

def install
  bin.install "aleph-cli-macos-aarch64" => "aleph" if on_arm?
  bin.install "aleph-cli-macos-x86_64" => "aleph" unless on_arm?
end

This is more concise and consistent with the rest of the formula.

packaging/brew/test-local.sh (line 25): The trap only catches EXIT, so Ctrl+C (SIGINT) or process termination (SIGTERM) won't trigger cleanup. Consider adding these signals:

trap cleanup EXIT INT TERM

This ensures the formula is uninstalled and temp directory removed even if the script is interrupted.

.github/workflows/release.yml (line 315): Consider adding a permissions block to explicitly declare the workflow's permissions, consistent with the publish-apt job which has contents: write. While not strictly necessary (the job doesn't write to the source repo), it's good practice for clarity.

@odesenfans odesenfans merged commit e3165e9 into main Mar 23, 2026
9 checks passed
@odesenfans odesenfans deleted the feat/brew-packaging branch March 23, 2026 16:22
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