Skip to content

Migrate release process to GoReleaser#20

Merged
chinmaymk merged 2 commits intomainfrom
claude/goreleaser-bun-action-CHAua
Mar 11, 2026
Merged

Migrate release process to GoReleaser#20
chinmaymk merged 2 commits intomainfrom
claude/goreleaser-bun-action-CHAua

Conversation

@chinmaymk
Copy link
Copy Markdown
Owner

Summary

This PR migrates the release workflow from a custom multi-job build and release process to GoReleaser, a unified release automation tool. This simplifies the CI/CD pipeline and provides better cross-platform binary management.

Key Changes

  • Replaced custom build matrix with GoReleaser: Removed the manual build job that compiled binaries for 5 different targets (Linux x64/arm64, macOS x64/arm64, Windows x64) and consolidated into a single goreleaser job
  • Added .goreleaser.yaml configuration: New configuration file that defines:
    • Bun as the builder for all 5 target platforms
    • Automatic archive creation (tar.gz for Unix, zip for Windows)
    • Universal binary support for macOS
    • Checksum generation
    • Release notes footer with installation instructions
  • Simplified release workflow: Removed the separate release job that downloaded artifacts, compressed them, and created checksums. GoReleaser handles all of this automatically
  • Updated install script: Modified install.sh to work with GoReleaser's naming convention:
    • Changed asset naming from ra-{os}-{arch} to ra_{OS}_{ARCH}.{ext} format
    • Updated extraction logic to handle tar.gz archives instead of gzip-compressed binaries
    • Simplified macOS handling to use universal binaries
  • Added workflow permissions: Added contents: write permission at workflow level for GitHub release creation

Implementation Details

  • GoReleaser v2 is used with the --clean flag to ensure fresh builds
  • The workflow now runs on a single ubuntu-latest runner instead of a matrix of different OS runners
  • Binary stripping logic is removed (GoReleaser handles this internally)
  • Artifact upload/download steps are eliminated in favor of GoReleaser's direct release publishing

https://claude.ai/code/session_01HAwDpSZhFrFiwouBFjqWRr

claude added 2 commits March 11, 2026 19:57
GoReleaser's native Bun support (v2.6+) handles cross-compilation,
archiving, checksums, and GitHub release publishing in a single step,
replacing the previous multi-job matrix build approach.

- Add .goreleaser.yaml with builder: bun targeting 5 platforms
- Enable universal_binaries for macOS (single binary for x64+arm64)
- Simplify release.yml from 4 jobs to 3 (test + goreleaser + npm)
- Update install.sh for GoReleaser's tar.gz archive naming convention

https://claude.ai/code/session_01HAwDpSZhFrFiwouBFjqWRr
Add --version/-v flag that prints version and short commit hash.
GoReleaser passes these via --define at compile time using its
template variables ({{ .Version }}, {{ .ShortCommit }}).
When running from source, falls back to "ra dev".

https://claude.ai/code/session_01HAwDpSZhFrFiwouBFjqWRr
@chinmaymk chinmaymk merged commit 8b5a235 into main Mar 11, 2026
1 check passed
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