Replaced the manual release script and GitHub Actions workflow with GoReleaser for the mdriver Rust project.
GoReleaser configuration that:
- Uses the experimental Rust builder with
cargo-zigbuildfor cross-compilation - Builds for 3 targets:
x86_64-unknown-linux-gnu,x86_64-apple-darwin,aarch64-apple-darwin - Creates
.tar.gzarchives with README.md, LICENSE, CHANGELOG.md - Generates checksums
- Auto-generates changelog from GitHub commits (grouped by feat/fix/other)
- Adds a release header with installation instructions
Simplified workflow:
- Install Rust + Zig + cargo-zigbuild
- Run GoReleaser (handles build, archive, release)
- Publish to crates.io
Simplified local release script:
- No longer manually updates CHANGELOG.md (GoReleaser generates it)
- Still handles version bump, commit, and tag
- Runs checks (fmt, clippy, test) before tagging
-
Used GoReleaser's native Rust support - GoReleaser v2 has an experimental Rust builder that uses
cargo-zigbuildfor cross-compilation -
Single CI runner - Instead of matrix builds across multiple OS, GoReleaser cross-compiles from Ubuntu using Zig
-
Auto-generated changelogs - GoReleaser generates release notes from git commits, so we removed manual CHANGELOG.md updates from the release script
Verified locally with:
goreleaser check # Config validation
goreleaser build --snapshot --clean --single-target # Local build
goreleaser release --snapshot --clean --skip=publish # Full dry-runAll three targets built successfully and archives were created with checksums.
- zig - For cross-compilation
- cargo-zigbuild - Cargo plugin for Zig-based cross-compilation
- goreleaser - Release automation tool
.goreleaser.yaml(new).github/workflows/release.yml(modified)tools/release.sh(modified)