Skip to content

ci: release through version.json and the org's shared workflows - #2

Merged
bdchatham merged 1 commit into
mainfrom
feat/uci-release-tooling
Aug 5, 2026
Merged

ci: release through version.json and the org's shared workflows#2
bdchatham merged 1 commit into
mainfrom
feat/uci-release-tooling

Conversation

@bdchatham

Copy link
Copy Markdown
Collaborator

Adopts the release tooling the other Go repositories here use — bump version.json, label the PR release, merge, and the tag and Release follow. Replaces the v0.1.0 tag I pushed by hand, which nothing recorded and nobody could review.

version.json is seeded at v0.1.0 to match the existing tag, so merging this releases nothingrelease-publish sees the tag and no-ops. The next bump is the first one the tooling performs.

What changed my mind while wiring this

I expected release-check to be binary-oriented and only marginally useful for a library. It isn't. It runs gorelease and gocompat against the previous tag — the Go project's own API-compatibility checkers. They compare the exported surface to the last release and report whether the version increment is semver-honest.

For a module whose entire purpose is to be imported, catching a breaking change under a patch bump is worth considerably more than any build artifact. That check is the main reason to adopt this rather than keep tagging by hand.

It also only proposes a tag when the PR carries a release label, so an ordinary version edit on a feature branch can't release by accident.

One deliberate omission

No goreleaser-release job, unlike sei-chain's integration.

This module is a library, so the tag is the releasego get resolves a version from the module proxy, which reads it from the tag. There is no binary to build and nothing to attach. The repos that chain GoReleaser after release-publish are shipping a command; we aren't. The comment in uci-release-publish.yml records where that job would go if this ever does.

If you'd rather have source archives, checksums or an SBOM attached anyway, that's a reasonable thing to want and I can add the job — it just isn't on the path a Go consumer uses.

Notes

  • Both callers pin uci@v0.0.15, the current tag, rather than the mixed v0.0.9/v0.0.11 an older integration drifted onto.
  • release-check uses pull_request_target because it needs a token that can comment on the PR, which a fork-originated pull_request run doesn't get. That trigger is privileged, so worth stating why it's safe here: nothing in these files checks out or executes PR code, and the reusable workflow reads version.json through the API at the head SHA rather than from a checkout.
  • bin/check.sh still passes; no Go source changed.

Adopts the release tooling the other Go repositories here use: bump
version.json, label the pull request `release`, merge, and the tag and GitHub
Release follow. Replaces the tag I pushed by hand for v0.1.0, which nothing
recorded and nobody could review.

version.json is seeded at v0.1.0 to match the existing tag, so installing this
does not itself release anything — release-publish sees the tag and no-ops. The
next bump is the first one the tooling performs.

The part worth knowing is that release-check earns its place on a LIBRARY, which
is not what I assumed when I started wiring this. It runs `gorelease` and
`gocompat` against the previous tag: the Go project's own API-compatibility
checkers, comparing the exported surface to the last release and reporting
whether the version increment is semver-honest. For a module whose whole purpose
is to be imported, catching a breaking change under a patch bump is worth more
than any build artifact. It also only proposes a tag when the pull request
carries a `release` label, so an ordinary version edit on a feature branch cannot
release by accident.

Deliberately NO goreleaser-release job, unlike sei-chain's integration. This
module is a library, so the tag IS the release — `go get` resolves a version from
the module proxy, which reads it from the tag, and there is no binary to build or
attach. The repositories that chain goreleaser after release-publish are shipping
a command. The comment in uci-release-publish.yml says where that job would go if
this ever does.

Both callers pin uci@v0.0.15, the current tag, rather than the mixed v0.0.9 and
v0.0.11 an older integration ended up on.

release-check is triggered by pull_request_target because it needs a token that
can comment on the pull request, which a fork-originated run does not get. That
makes the trigger privileged, so it is worth stating why it is safe: nothing in
these files checks out or executes pull-request code, and the reusable workflow
reads version.json through the API at the head SHA rather than from a checkout.
@bdchatham
bdchatham merged commit 4743a04 into main Aug 5, 2026
4 checks passed
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