Skip to content

Modernize the release pipeline and fix multi-arch image publishing#465

Merged
goccy merged 2 commits into
mainfrom
release-workflow-modernization
May 18, 2026
Merged

Modernize the release pipeline and fix multi-arch image publishing#465
goccy merged 2 commits into
mainfrom
release-workflow-modernization

Conversation

@goccy

@goccy goccy commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

Now that the SQL backend is pure Go, this reworks the release pipeline along the same lines as goccy/googlesqlite and goccy/tobari, and fixes the long-standing multi-arch container image problem using the approach from goccy/wasmify.

  • release.yml — Replace svenstaro/upload-release-action (which only shipped two raw linux/amd64 + darwin/amd64 binaries) with GoReleaser. It now produces archives for darwin/linux/windows × amd64/arm64, deb/rpm/apk packages, and checksums.txt. Every artifact gets a signed GitHub build-provenance attestation via actions/attest-build-provenance.
  • .goreleaser.yml (new) — GoReleaser config mirroring the tobari/wasmify setup: cgo-free build with main.version/main.revision injected via ldflags.
  • build.yml — Fix multi-arch publishing. The old per-arch runner matrix (ubuntu-latest + ubuntu-24.04-arm) pushed both builds to the same tags, so the second run silently overwrote the first and the published image was never actually multi-arch. A single buildx invocation now emits one linux/amd64+linux/arm64 manifest. The image manifest is attested and the attestation pushed to GHCR (one digest → one attestation covers all tags).
  • Dockerfile — Cross-compile the pure-Go binary from the build platform using the BuildKit platform args ($BUILDPLATFORM/$TARGETOS/$TARGETARCH), so multi-arch builds need no QEMU emulation.
  • Makefile — Switch docker/build to buildx and add a docker/build/multiarch target.
  • README.md — Document the multi-arch image and how to verify attestations with gh attestation verify.

Verification

  • Cross-compiled successfully for linux/amd64, linux/arm64, darwin/arm64, windows/amd64.
  • goreleaser check passes with no warnings.
  • Workflow YAML validated.

Multi-arch Docker builds were not run locally (no buildx component on the dev machine); CI installs it via docker/setup-buildx-action.

🤖 Generated with Claude Code

goccy and others added 2 commits May 18, 2026 18:48
Replace the binary release with GoReleaser now that the SQL backend is
pure Go, and attach signed GitHub build-provenance attestations to both
the release archives and the container image.

- release.yml: run GoReleaser to produce darwin/linux/windows binaries
  for amd64/arm64 plus deb/rpm/apk packages, then attest every artifact
  with actions/attest-build-provenance.
- build.yml: drop the per-arch runner matrix that pushed both builds to
  the same tags (so the second run silently overwrote the first and the
  image was never actually multi-arch). A single buildx invocation now
  emits one linux/amd64+linux/arm64 manifest, and the image manifest is
  attested and the attestation pushed to GHCR.
- Dockerfile: cross-compile the pure-Go binary from the build platform
  using the BuildKit platform args, so multi-arch builds need no QEMU.
- Makefile: switch docker/build to buildx and add docker/build/multiarch.
- README: document multi-arch images and attestation verification.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pin setup-go to the latest stable release instead of the go.mod
version so release binaries always ship from the current toolchain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@goccy goccy merged commit 92f5ee7 into main May 18, 2026
12 checks passed
@goccy goccy deleted the release-workflow-modernization branch May 18, 2026 13:26
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.

1 participant