Release on a v* tag: static binaries and SHA256SUMS on a Gitea Release #8

Merged
jcoffey-dev merged 1 commits from ci/release-pipeline into main 2026-10-05 06:13:08 +00:00
Owner

The installer's first release build. Nothing stamped the version before, so inbuxa version said dev.

  • scripts/build-release.sh TAG OUTDIR: builds static (CGO_ENABLED=0) inbuxa-linux-amd64 and inbuxa-linux-arm64 with -X main.version=<tag without v>, plus SHA256SUMS. It refuses tags that aren't v<year>.<month>.<day>[.<n>], and it runs the same locally as in CI.
  • .gitea/workflows/release.yml: runs on v* tags, in golang:1.26-bookworm pinned by digest (Go 1.26.8, matching go.mod).
    • It checks the tag is annotated and on main.
    • It runs go test -count=1 ./... and builds.
    • It creates a draft Release whose notes are the tag's annotation, attaches all three files over Gitea's internal URL, then publishes. If an upload fails, the draft is deleted.
    • Its announce job posts to the forum: a Release made with the job token doesn't trigger announce.yml.
  • Built on Gitea, not GitHub: Go cross-compiles both architectures on the amd64 runner in about a minute, so BUILD_ON has nothing to offload. The GitHub copy of the Release comes from release-sync.py, which already lists the installer.
  • announce.yml: now pins discourse-release 9282c6f, the same commit release.yml uses.
  • README: a Download section using versioned URLs. Gitea 1.27 returns 404 for releases/latest/download/<file> (checked against inbuxa-migrate's release); only releases/latest redirects, to the tag page.

Tested: the script locally and inside the pinned image offline. Both binaries are static ELF for x86-64 and aarch64, and version prints 2026.10.5. Both workflow files parse. The release job itself first runs on the tag.

The installer's first release build. Nothing stamped the version before, so `inbuxa version` said `dev`. - **`scripts/build-release.sh TAG OUTDIR`:** builds static (`CGO_ENABLED=0`) `inbuxa-linux-amd64` and `inbuxa-linux-arm64` with `-X main.version=<tag without v>`, plus `SHA256SUMS`. It refuses tags that aren't `v<year>.<month>.<day>[.<n>]`, and it runs the same locally as in CI. - **`.gitea/workflows/release.yml`:** runs on `v*` tags, in `golang:1.26-bookworm` pinned by digest (Go 1.26.8, matching go.mod). - It checks the tag is annotated and on main. - It runs `go test -count=1 ./...` and builds. - It creates a **draft** Release whose notes are the tag's annotation, attaches all three files over Gitea's internal URL, then publishes. If an upload fails, the draft is deleted. - Its `announce` job posts to the forum: a Release made with the job token doesn't trigger `announce.yml`. - **Built on Gitea, not GitHub:** Go cross-compiles both architectures on the amd64 runner in about a minute, so `BUILD_ON` has nothing to offload. The GitHub copy of the Release comes from `release-sync.py`, which already lists the installer. - **`announce.yml`:** now pins discourse-release `9282c6f`, the same commit `release.yml` uses. - **README:** a Download section using versioned URLs. Gitea 1.27 returns 404 for `releases/latest/download/<file>` (checked against inbuxa-migrate's release); only `releases/latest` redirects, to the tag page. **Tested:** the script locally and inside the pinned image offline. Both binaries are static ELF for x86-64 and aarch64, and `version` prints `2026.10.5`. Both workflow files parse. The release job itself first runs on the tag.
jcoffey-dev added 1 commit 2026-10-05 06:12:54 +00:00
The installer had no release build: `inbuxa version` said "dev" because
nothing stamped it. scripts/build-release.sh builds static linux/amd64 and
linux/arm64 binaries with the tag stamped in, plus SHA256SUMS, and is what
.gitea/workflows/release.yml runs on a v<year>.<month>.<day>[.<n>] tag.

The workflow checks the tag is annotated and on main, runs the tests,
builds, and attaches the files to a draft Release it publishes only once all
three are there; the tag's annotation is the notes. It is built here rather
than on GitHub: static Go cross-compiles both architectures on this runner,
so BUILD_ON has nothing to offload. A Release made with the job's token
starts no other workflow, so this one announces it.

announce.yml moves to the same discourse-release pin, 9282c6f. The README
says where the binaries are and how to check them.
jcoffey-dev merged commit e658eff952 into main 2026-10-05 06:13:08 +00:00
jcoffey-dev deleted branch ci/release-pipeline 2026-10-05 06:13:08 +00:00
Sign in to join this conversation.