Skip to content

ci(release): build every archive on Linux with GoReleaser - #59

Merged
capy-ai[bot] merged 8 commits into
mainfrom
ci/goreleaser
Oct 27, 2026
Merged

capy-ai[bot] merged 8 commits into
mainfrom
ci/goreleaser

Conversation

@sweepies

@sweepies sweepies commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Moves the release build to GoReleaser. All four archives, macOS included, now build on one Linux runner with cargo-zigbuild, so no macOS runner builds anything. macOS runners only run the darwin smoke tests, which take seconds.

What changed

  • .goreleaser.yaml uses builder: rust with cargo zigbuild for x86_64/aarch64 unknown-linux-musl and apple-darwin. It writes the archives (same names and directory layout as before) and patchula-vX.Y.Z-checksums.txt. The man page, completions and usage spec come from a post-build hook that runs docs:cli against the build the host can execute. GoReleaser publishes nothing (release.disable, changelog.disable).
  • mise run release:dist replaces release:package. GoReleaser and cargo-zigbuild are task tools pinned in mise.toml, and Zig already comes from mise. The musl linker overrides in .cargo/config.toml are gone because cargo-zigbuild sets the linker per target.
  • macOS on Linux. Zig cross-compiles every C dependency (aws-lc, bundled SQLite, zstd) for darwin with its own headers, and its bundled libSystem covers libc and iconv. Only the link needed more: rustls-platform-verifier imports 23 symbols from Security and CoreFoundation, and Zig ships no Apple frameworks. release/macos-sdk holds two small .tbd text stubs listing exactly those symbols, and release:dist points SDKROOT at them. The binaries record the real framework install names, so macOS loads the system frameworks at run time. Keychain-based TLS trust is unchanged, and no Xcode SDK is involved. If a dependency update imports a new symbol from either framework, the link fails with undefined symbol: _Name, and the fix is adding that name to the stub.
  • Workflow. The flow is still guard → bump → build → smoke → image → land → publish. The Linux/macOS build matrix is now one Build job. It runs GoReleaser in tag mode against a local vX.Y.Z tag on the bump commit, with --skip=publish, so the archive names are the release's. The smoke tests (4 runners, including macos-26 and macos-26-intel), the image job and the publish job all download that one dist artifact. Nothing lands or publishes unless every smoke test and the image test passed.
  • Publish makes the GitHub release from exactly those files: it checks them against the checksums file, runs gh release create --draft, then packslip (attestations and signature, unchanged), then un-drafts. communique still rewrites the notes afterwards, with the Infisical OIDC step unchanged. The checksums file is a new release asset.
  • Dockerfile extracts bin/patchula LICENSE. GoReleaser's tar entries carry no ./ prefix.
  • Docs. internals/releasing.md covers the new build step, GoReleaser and the framework stubs.

Why no rebuild, and why the image stays its own job

GoReleaser OSS can't publish artifacts it didn't build in the same run (publish is Pro). So GoReleaser owns build, archive and checksums, and the workflow publishes the smoke-tested files with gh. I tried rebuilding in the publish job behind a byte-identical checksum gate. Linux rebuilt identically, but Zig's Mach-O linker names anonymous local symbols after the thread that parsed their object file, so darwin symbol tables, and with them the UUIDs and signatures, differed between runners. The gate caught it. Publishing the tested files directly is simpler and stronger than proving a rebuild is reproducible.

The container image stays in its own job. GoReleaser's dockers_v2 would rebuild the image at publish time, and the Dockerfile's apt-get install makes that rebuild differ from the image the smoke test ran. The existing job pushes the tested layers by digest and tags them only after land.

Validation

  • goreleaser check passes, and a local goreleaser release --snapshot --clean builds all four archives.
  • Dry run 40455038654 (version=0.5.3, dry_run=true): Guard, Bump, Build (one ubuntu runner, 21 min), all four smoke tests and the container image passed. darwin-arm64 ran on macos-26 and darwin-x64 on macos-26-intel, both from the Linux-built archives. Land and Publish are skipped in a dry run by design, so the gh release and packslip steps were not exercised. They are the same as on main apart from file paths.

Archives from the dry run:

dist/patchula-v0.5.3-checksums.txt
dist/patchula-v0.5.3-darwin-arm64.tar.gz
dist/patchula-v0.5.3-darwin-x64.tar.gz
dist/patchula-v0.5.3-linux-arm64-musl.tar.gz
dist/patchula-v0.5.3-linux-x64-musl.tar.gz
generated/patchula.usage.kdl

patchula-v0.5.3-linux-x64-musl.tar.gz:
LICENSE
README.md
share/bash-completion/completions/patchula
share/fish/vendor_completions.d/patchula.fish
share/man/man1/patchula.1
share/zsh/site-functions/_patchula
bin/patchula

Sizes, v0.5.2 release vs this dry run, in bytes:

Platform Archive before Archive after Binary before Binary after
darwin-arm64 14,292,165 14,763,637 37,758,672 38,096,000
darwin-x64 15,391,341 15,539,223 41,156,008 41,343,184
linux-arm64-musl 13,265,334 13,619,372 30,019,304 29,721,776
linux-x64-musl 14,472,248 14,619,488 35,035,656 34,728,464

The binaries are within 1% of v0.5.2, which was one release of code earlier. The archives grew by up to 3.3%, for darwin-arm64.

Follow-ups

Homebrew, deb/rpm (nfpms) and Scoop are each a short GoReleaser section now that it produces the archives.

…Linux

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@deepsource-io

deepsource-io Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 8539c06...75f7b3c on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Rust Oct 27, 2026 5:13a.m. Review ↗
JavaScript Oct 27, 2026 5:13a.m. Review ↗
Shell Oct 27, 2026 5:13a.m. Review ↗
Secrets Oct 27, 2026 5:13a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
count-patchula 75f7b3c Commit Preview URL

Branch Preview URL
Oct 27 2026, 05:15 AM

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

RetriggerView in Greptile

[High impact] The PR appears safe to merge; no new blocking issue was found.

Reviews (6) · Last reviewed commit: "ci(release): publish the smoke-tested ar..." · Reviewed by Greptile

Comment thread .goreleaser.yaml Resolved
sweepies and others added 7 commits October 27, 2026 02:08
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ducible links

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot changed the title ci(release): build and publish with GoReleaser, macOS cross-built on Linux ci(release): build every archive on Linux with GoReleaser Oct 27, 2026
@capy-ai
capy-ai Bot merged commit 611d2f6 into main Oct 27, 2026
23 checks passed
@capy-ai
capy-ai Bot deleted the ci/goreleaser branch October 27, 2026 05:53
sweepies added a commit that referenced this pull request Oct 27, 2026
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