Skip to content

feat: set up cargo-dist for automated builds and installers#72

Merged
alvinreal merged 1 commit intomainfrom
fix/issue-67
Feb 22, 2026
Merged

feat: set up cargo-dist for automated builds and installers#72
alvinreal merged 1 commit intomainfrom
fix/issue-67

Conversation

@alvinreal
Copy link
Owner

Sets up cargo-dist (v0.30.4) for fully automated release builds and distribution.

What This Does

When a version tag (e.g. v0.2.0) is pushed, the generated release.yml workflow will:

  1. Build optimized binaries for 6 targets:

    • x86_64-unknown-linux-gnu
    • x86_64-unknown-linux-musl (static, no glibc dependency)
    • aarch64-unknown-linux-gnu (ARM64 Linux)
    • x86_64-apple-darwin (Intel Mac)
    • aarch64-apple-darwin (Apple Silicon)
    • x86_64-pc-windows-msvc (Windows)
  2. Create installers:

    • Shell script: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/alvinreal/morph/releases/latest/download/morph-installer.sh | sh
    • PowerShell: irm https://github.com/alvinreal/morph/releases/latest/download/morph-installer.ps1 | iex
    • Homebrew formula (tap: alvinreal/homebrew-tap)
  3. Generate artifacts: tarballs/zips, SHA256 checksums, source archive

  4. Create GitHub Release with changelog

Files Changed

  • Cargo.toml: Added package metadata (description, license, repository, homepage) + [profile.dist] with LTO
  • dist-workspace.toml: cargo-dist configuration (targets, installers, Homebrew tap)
  • .github/workflows/release.yml: Auto-generated release workflow

Verification

  • dist plan shows correct build matrix with all 6 targets
  • All existing tests pass (658 unit + 72 integration)
  • cargo fmt and cargo clippy clean

Fixes #67

Configures cargo-dist (dist) v0.30.4 for automated release pipeline:

- Shell installer (curl | sh) for Linux/macOS
- PowerShell installer (irm | iex) for Windows
- Homebrew formula generation (tap: alvinreal/homebrew-tap)
- Optimized release profile with LTO

Build targets:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- x86_64-apple-darwin (Intel Mac)
- aarch64-apple-darwin (Apple Silicon)
- x86_64-pc-windows-msvc

Generated release.yml workflow triggers on version tags.
Added package metadata (description, license, repository, homepage).
dist plan verified: produces correct build matrix and artifacts.

Fixes #67
@alvinreal alvinreal merged commit 4dfcb51 into main Feb 22, 2026
13 checks passed
@alvinreal alvinreal deleted the fix/issue-67 branch February 22, 2026 20:39
@github-actions github-actions bot mentioned this pull request Mar 20, 2026
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.

Release: Set up cargo-dist for automated builds & installers

1 participant