Skip to content

ci(release): publish nix2container binaries on release tags (RIG-9273) - #6

Merged
mattwilkinsonn merged 5 commits into
rigel-releasefrom
dependencies/rig-9273-publish-nix2container-binaries-on
Nov 14, 2026
Merged

mattwilkinsonn merged 5 commits into
rigel-releasefrom
dependencies/rig-9273-publish-nix2container-binaries-on

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 11, 2026 •

Copy link
Copy Markdown

Summary

  • release.yml: a v*-rigel.* tag builds nix2container for linux-amd64, linux-arm64 and darwin-arm64 (CGO_ENABLED=0), then publishes the binaries and SHA256SUMS to a GitHub Release.
  • Release builds use Go 1.26 with check-latest, so they pick up patch releases. Lint reads go.mod (Go 1.24), so the two jobs use different toolchains on purpose.
  • A guard job refuses a tag that differs from v plus .github/rigel-version before any build runs.
  • workflow_dispatch takes an existing tag input and checks out refs/tags/<tag>, so a non-tag input fails at checkout. A tag that predates this workflow can be backfilled.
  • Pull requests run the build matrix only. contents: write is granted only to the release job.
  • Lint: pin golangci-lint v2.15.0 through action v9.3.0. version: latest had resolved to v1.64.8, which fails on Go 1.26. Add .golangci.yml (v2) enabling gofmt as a formatter, replacing the removed -E gofmt.
  • Pin checkout and setup-go in the lint job to the release SHAs.
  • hk.pkl pre-push runs actionlint on the two workflows this PR owns. actionlint is added to the devShell.

Verification

  • Static checks only. No local build.
  • actionlint 1.7.12 (digest checked) passes on both workflows. A bad workflow exits 1.
  • CI: lint passes on golangci-lint v2.15.0. The build matrix, test, tests and check pass.

Risks

  • The push trigger publishes only tags created after merge. The existing v1.1.0-rigel.1 needs a version bump or a dispatch backfill. The dispatch path is not yet exercised.
  • The flake package and its no-source-build check follow the first published digests.

Refs RIG-9273

Co-authored-by: Matt Wilkinson matt@rigel.build

Build linux-amd64, linux-arm64 and darwin-arm64 binaries with CGO disabled,
then attach them and SHA256SUMS to a GitHub Release. The release job runs
only on v*-rigel.N tags minted by release-tag.yaml, and checks the tag
against .github/rigel-version. Pull requests run the build matrix only.

Add an hk pre-push hook so rjc's hook gate sees a configured check.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Nov 11, 2026

Copy link
Copy Markdown

RIG-9273

rigel-mintaka and others added 4 commits November 11, 2026 00:30
The lint job used golangci-lint-action@v3 with version latest. That resolved
to v1.64.8, built with Go 1.24, and failed on the Go 1.26 runner with
'file requires newer Go version go1.26'. Pin the action to v9.3.0 by SHA and
the linter to v2.15.0, the newest v2 release whose go.mod targets Go 1.26.
The -E gofmt arg still resolves under v2.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
golangci-lint v2 rejects '-E gofmt' with 'gofmt is a formatter', so the
lint job failed at config load even on the pinned v2.15.0 binary. Move the
gofmt check into a version 2 .golangci.yml, pin the linter set to standard
to match the v1 default, and drop the args line.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
- Build release binaries with Go 1.26.11 via setup-go go-version, not the
  go.mod floor (go 1.24.0), so binaries carry a current stdlib.
- Add workflow_dispatch with an existing tag input to backfill a release.
- Move the tag/version guard into a guard job the build depends on, so a
  mismatched tag fails before the matrix runs.
- Add a concurrency group so a manual re-run cannot race a first run.
- Pin checkout and setup-go in the lint job to the release SHAs and read
  the Go version from go.mod.
- Replace the yq parse check in the pre-push hook with actionlint, and add
  actionlint to the devShell.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
… (RIG-9273)

- Key concurrency on the release tag so a dispatch backfill and a tag
  push for the same tag serialize.
- Check out refs/tags/<tag> on dispatch, so a non-tag input fails at
  checkout rather than creating a release at another branch's SHA.
- Use go-version 1.26 with check-latest, so the release toolchain picks
  up patch releases without a manual bump.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka

Copy link
Copy Markdown
Author

Review: round 1 at 6021c61 found 3 medium and 4 low; all fixed in 1e0a47d. Round 2 at 1e0a47d found 3 low; all fixed in 2a27ddb (concurrency key, tag-ref checkout, go 1.26 check-latest). CI green. All-clear at 2a27ddb.

@rigel-mintaka
rigel-mintaka marked this pull request as ready for review November 11, 2026 06:10
@rigel-mintaka

Copy link
Copy Markdown
Author

Handoff from deps to go-migration (lane fold, 2026-11-13). Reviewed, ready. Next: merge; then tag a release and do the flake package (RIG-9273) and the nix2container upstream sync (RIG-9206, local 2e82d2d).

@mattwilkinsonn
mattwilkinsonn merged commit 1c63749 into rigel-release Nov 14, 2026
13 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.

2 participants