Skip to content

Modernize release automation with GoReleaser and multi-arch Docker builds#238

Merged
umputun merged 7 commits intomasterfrom
release-automation
Dec 7, 2025
Merged

Modernize release automation with GoReleaser and multi-arch Docker builds#238
umputun merged 7 commits intomasterfrom
release-automation

Conversation

@umputun
Copy link
Owner

@umputun umputun commented Dec 7, 2025

Summary

  • Add release.yml workflow for automatic binary publishing via GoReleaser on tag push
  • Add docker.yml workflow with parallel multi-arch builds (amd64/arm64 on native runners)
  • Remove Docker build steps from ci.yml (now CI-only: tests, lint, coverage)
  • Add Homebrew tap configuration to .goreleaser.yml
  • Remove obsolete Dockerfile.artifacts and Makefile dist target
  • Update README with Homebrew installation instructions

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.

…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
Copilot AI review requested due to automatic review settings December 7, 2025 23:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
version: ~> 1.25
version: ~> v1

Copilot uses AI. Check for mistakes.

steps:
- name: checkout
uses: actions/checkout@v4
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
uses: actions/checkout@v4
uses: actions/checkout@v6

Copilot uses AI. Check for mistakes.
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v6
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
uses: actions/checkout@v6
uses: actions/checkout@v6
with:
fetch-depth: 0

Copilot uses AI. Check for mistakes.
repository:
owner: umputun
name: homebrew-apps
branch: master
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
branch: master
branch: master
token: "{{ .Env.HOMEBREW_GITHUB_TOKEN }}"

Copilot uses AI. Check for mistakes.
artifact: linux-amd64
- platform: linux/arm64
runner: ubuntu-24.04-arm
artifact: linux-arm64
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
artifact: linux-arm64
artifact: linux-arm64
- platform: linux/arm/v7
runner: ubuntu-latest
artifact: linux-armv7

Copilot uses AI. Check for mistakes.
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.
@umputun umputun force-pushed the release-automation branch from a60d165 to 4a541b2 Compare December 7, 2025 23:40
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.
@umputun umputun merged commit ed44d55 into master Dec 7, 2025
3 checks passed
@umputun umputun deleted the release-automation branch December 7, 2025 23:58
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