Skip to content

Instantly share code, notes, and snippets.

@llimllib
Created January 16, 2026 16:09
Show Gist options
  • Select an option

  • Save llimllib/bbf7c70a5b16e6376b721533ff48fe1f to your computer and use it in GitHub Desktop.

Select an option

Save llimllib/bbf7c70a5b16e6376b721533ff48fe1f to your computer and use it in GitHub Desktop.
Claude Code session: GoReleaser migration for mdriver

GoReleaser Migration Session Transcript

Summary

Replaced the manual release script and GitHub Actions workflow with GoReleaser for the mdriver Rust project.

Changes Made

1. Created .goreleaser.yaml

GoReleaser configuration that:

  • Uses the experimental Rust builder with cargo-zigbuild for cross-compilation
  • Builds for 3 targets: x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin
  • Creates .tar.gz archives 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

2. Updated .github/workflows/release.yml

Simplified workflow:

  1. Install Rust + Zig + cargo-zigbuild
  2. Run GoReleaser (handles build, archive, release)
  3. Publish to crates.io

3. Updated tools/release.sh

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

Key Decisions

  1. Used GoReleaser's native Rust support - GoReleaser v2 has an experimental Rust builder that uses cargo-zigbuild for cross-compilation

  2. Single CI runner - Instead of matrix builds across multiple OS, GoReleaser cross-compiles from Ubuntu using Zig

  3. Auto-generated changelogs - GoReleaser generates release notes from git commits, so we removed manual CHANGELOG.md updates from the release script

Testing

Verified locally with:

goreleaser check  # Config validation
goreleaser build --snapshot --clean --single-target  # Local build
goreleaser release --snapshot --clean --skip=publish  # Full dry-run

All three targets built successfully and archives were created with checksums.

Requirements

  • zig - For cross-compilation
  • cargo-zigbuild - Cargo plugin for Zig-based cross-compilation
  • goreleaser - Release automation tool

Files Changed

  • .goreleaser.yaml (new)
  • .github/workflows/release.yml (modified)
  • tools/release.sh (modified)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment