generated from fini-net/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Currently, releases don't include compiled binaries that can be consumed by Homebrew or other package managers. Users need to build from source.
Proposed Solution
Set up automated binary builds for releases that generate platform-specific artifacts suitable for Homebrew formula distribution.
Target Platforms
- macOS (Apple Silicon: aarch64-apple-darwin)
- macOS (Intel: x86_64-apple-darwin)
- Linux (x86_64-unknown-linux-gnu)
- Linux (x86_64-unknown-linux-musl) - for maximum compatibility
Implementation Options
-
GitHub Actions with cross-compilation
- Use
crossor native runners for each platform - Trigger on tag push or release creation
- Upload binaries as release assets
- Use
-
cargo-dist
- Purpose-built tool for Rust binary distribution
- Handles cross-compilation and asset uploads
- Generates installation scripts and Homebrew tap boilerplate
- See: https://opensource.axo.dev/cargo-dist/
-
Manual GitHub Actions workflow
- Custom workflow using
actions/upload-release-asset - More control but more maintenance
- Custom workflow using
Deliverables
- Binary artifacts attached to GitHub releases
- Checksums (SHA256) for each binary
- Archive format:
.tar.gzwith version in filename (e.g.,macaw-v0.1.0-x86_64-apple-darwin.tar.gz) - Documentation on creating Homebrew formula (or generate tap automatically)
Homebrew Integration
Once binaries are available, a Homebrew formula would look like:
class Macaw < Formula
desc "Domain registration backend integrating with OpenSRS API"
homepage "https://github.com/fini-net/macaw"
version "0.1.0"
if OS.mac? && Hardware::CPU.arm?
url "https://github.com/fini-net/macaw/releases/download/v0.1.0/macaw-v0.1.0-aarch64-apple-darwin.tar.gz"
sha256 "..."
elsif OS.mac? && Hardware::CPU.intel?
url "https://github.com/fini-net/macaw/releases/download/v0.1.0/macaw-v0.1.0-x86_64-apple-darwin.tar.gz"
sha256 "..."
elsif OS.linux?
url "https://github.com/fini-net/macaw/releases/download/v0.1.0/macaw-v0.1.0-x86_64-unknown-linux-musl.tar.gz"
sha256 "..."
end
def install
bin.install "macaw"
end
endRelated Commands
The existing just release <version> command creates releases with auto-generated notes. This workflow would extend that process to include binary artifacts.
References
- cargo-dist documentation: https://opensource.axo.dev/cargo-dist/
- Example Rust project with releases: rust-lang/mdBook
- GitHub Actions for Rust: actions-rs/cargo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request