Skip to content

feat: releases ship prebuilt binaries, so CI can download the generator instead of compiling it - #141

Merged
Michael McQuade (giraffesyo) merged 2 commits into
canaryfrom
feat/release-binaries
Oct 21, 2026
Merged

Michael McQuade (giraffesyo) merged 2 commits into
canaryfrom
feat/release-binaries

Conversation

@giraffesyo

Copy link
Copy Markdown
Member

A cold go tool github.com/parallelworks/openapi-client-generator in CI spends nearly all its time compiling the generator and libopenapi (26s in core's SDK freshness job before #139). Prebuilt release binaries let a pipeline download it in about a second.

Changes

  • release-please.yml: a binaries job runs when release-please creates a release. It checks out the tag, cross-compiles linux|darwin|windows × amd64|arm64 with -trimpath -s -w and CGO_ENABLED=0, and uploads openapi-client-generator_<version>_<os>_<arch>.tar.gz plus checksums.txt with gh release upload. Only that job gets contents: write, and the tag reaches the shell through env.
  • --version reports the release tag (set by -ldflags -X), or the module version from build info for go install / go tool builds.

Testing

  • actionlint and zizmor are clean on the workflow.
  • Ran the build script locally with TAG=v0.0.0-test: six tarballs and checksums, and the extracted darwin/arm64 binary prints openapi-client-generator version v0.0.0-test.
  • Without ldflags, --version prints the build-info module version.

…or instead of compiling it

When release-please creates a release, a follow-up job cross-compiles
linux, darwin and windows on amd64 and arm64 and uploads tarballs plus
checksums.txt to it. A cold `go tool` run spends nearly all its time
compiling the generator and libopenapi; a download skips that.

`--version` reports the release tag, or the module version for
`go install` and `go tool` builds, so a pipeline can confirm which
generator it ran.
@giraffesyo
Michael McQuade (giraffesyo) merged commit 46a2edf into canary Oct 21, 2026
8 checks passed
@giraffesyo
Michael McQuade (giraffesyo) deleted the feat/release-binaries branch October 21, 2026 01:30
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