Modernize release automation with GoReleaser and multi-arch Docker builds#238
Modernize release automation with GoReleaser and multi-arch Docker builds#238
Conversation
…r builds - Add release.yml workflow for automatic binary publishing via GoReleaser - Add docker.yml workflow with parallel multi-arch builds (amd64/arm64) - Remove Docker build steps from ci.yml (now CI-only) - Add Homebrew tap configuration to goreleaser.yml - Remove obsolete Dockerfile.artifacts and Makefile dist target - Update README with Homebrew installation instructions
There was a problem hiding this comment.
Pull request overview
This PR modernizes the release automation by introducing GoReleaser for binary publishing and restructuring Docker builds with native ARM runners for improved build performance. The changes separate CI concerns (testing, linting) from release/deployment workflows.
Key changes:
- Adds automated binary releases via GoReleaser with Homebrew tap integration
- Implements parallel multi-arch Docker builds using native ARM64 runners
- Removes Docker build responsibilities from CI workflow (now test-only)
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/release.yml | New workflow triggering GoReleaser on version tags to publish binaries and update Homebrew formula |
| .github/workflows/docker.yml | New workflow with parallel native-runner builds for amd64/arm64 Docker images |
| .github/workflows/ci.yml | Removes Docker build steps, now focuses solely on tests, linting, and coverage |
| .goreleaser.yml | Adds Homebrew tap configuration for automatic formula updates |
| Makefile | Removes obsolete dist target that built artifacts via Docker |
| Dockerfile.artifacts | Removed - replaced by GoReleaser in CI |
| README.md | Adds Homebrew installation instructions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: run goreleaser | ||
| uses: goreleaser/goreleaser-action@v6 | ||
| with: | ||
| version: ~> 1.25 |
There was a problem hiding this comment.
The version syntax appears incorrect. GoReleaser action expects versions in the format latest, v1.25.0, or a constraint like ~> v1 (note the 'v' prefix). The current ~> 1.25 format may not work as expected. Consider using latest or a specific version like v1.25.0.
| version: ~> 1.25 | |
| version: ~> v1 |
.github/workflows/docker.yml
Outdated
|
|
||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4 |
There was a problem hiding this comment.
Action version inconsistency: This workflow uses actions/checkout@v4 while other workflows in the PR (release.yml and ci.yml) use actions/checkout@v6. Consider updating to v6 for consistency across workflows.
| uses: actions/checkout@v4 | |
| uses: actions/checkout@v6 |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: check out code | ||
| uses: actions/checkout@v6 |
There was a problem hiding this comment.
Missing fetch-depth: 0 parameter for GoReleaser. GoReleaser typically requires the full git history to generate changelogs and properly tag releases. Add fetch-depth: 0 to the checkout step to ensure all git history is available.
| uses: actions/checkout@v6 | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 |
| repository: | ||
| owner: umputun | ||
| name: homebrew-apps | ||
| branch: master |
There was a problem hiding this comment.
GoReleaser needs a token with write permissions to the homebrew-apps repository to automatically update the Homebrew formula. The current GORELEASER_GITHUB_TOKEN may not have permissions to push to the umputun/homebrew-apps repository. Consider adding a token field under the repository section in the brews configuration, or ensure GORELEASER_GITHUB_TOKEN has the necessary permissions.
| branch: master | |
| branch: master | |
| token: "{{ .Env.HOMEBREW_GITHUB_TOKEN }}" |
| artifact: linux-amd64 | ||
| - platform: linux/arm64 | ||
| runner: ubuntu-24.04-arm | ||
| artifact: linux-arm64 |
There was a problem hiding this comment.
The new Docker workflow removes support for the linux/arm/v7 platform. The old ci.yml workflow built for linux/amd64,linux/arm/v7,linux/arm64, but the new docker.yml matrix only includes linux/amd64 and linux/arm64. If arm/v7 support is still needed, add it to the matrix. Otherwise, consider documenting this breaking change.
| artifact: linux-arm64 | |
| artifact: linux-arm64 | |
| - platform: linux/arm/v7 | |
| runner: ubuntu-latest | |
| artifact: linux-armv7 |
the mergeEvents function could block forever when sending to the output channel after context cancellation. this caused test timeouts and potential production goroutine leaks. also replaced context.Background() with t.Context() in tests for proper cleanup on test completion.
use assert.Eventually to wait for server readiness instead of fixed sleep. this makes the test more reliable on slow CI runners.
a60d165 to
4a541b2
Compare
replace 10ms sleep after h.Run() with require.Eventually polling to wait for server to accept connections. this fixes intermittent "connection refused" errors on slow CI runners.
Summary
This aligns reproxy release process with stash/cronn patterns - binaries auto-attach to GitHub Releases, Docker builds run faster on native ARM runners, and Homebrew formula auto-updates.