Skip to content

Releasing

Semantic versioning, starting at v0.1.0. While the major version is 0, a minor release may change manifest or protocol details. Every such change has an entry in DECISIONS.md and a line in CHANGELOG.md. Patch releases fix bugs only. A tag with a hyphen (v0.2.0-rc.1) is a pre-release: it gets a GitHub pre-release and no latest image tag.

  1. Make sure main is green and make fmt vet test lint vuln pass in Docker.
  2. Run make deploy-check workflows-check release-check and make release-snapshot (everything runs in containers; the snapshot publishes nothing and writes dist/).
  3. Update CHANGELOG.md and commit it.
  4. Dry run first: tag a release candidate, git tag -a v0.1.0-rc.1 -m "v0.1.0-rc.1" && git push origin v0.1.0-rc.1. A tag with a hyphen is a pre-release and gets no latest image tag, so it exercises the whole pipeline (binaries, images, signing, SBOM, attestation) without publishing a stable release. Verify it with the commands below. If it fails, delete the release, the tag and the images it made, fix the workflow, and tag rc.2.
  5. Tag and push the real release: git tag -a v0.1.0 -m "v0.1.0" && git push origin v0.1.0. A plain annotated tag needs no signing key. Releases are signed by the workflow, not by your tag.
  6. Watch the release workflow. When it ends, open the release page and check the files below. The binaries and the images both print the version without the v (0.1.0).

The release workflow runs on a tag matching v*.

  1. test: go vet and go test -race ./... with real Redis and Postgres.
  2. publish, only if the tests pass:
    • GoReleaser builds gateway, gwctl and gwbridge for linux, darwin and windows on amd64 and arm64, archives them, writes checksums.txt, writes an SPDX SBOM for each archive (syft), and signs checksums.txt keyless with cosign (one bundle, checksums.txt.sigstore.json). It creates the GitHub release with the git log as notes.
    • A build provenance attestation is created for the files listed in checksums.txt.
    • Multi-arch (linux/amd64 and linux/arm64) images are built from the gateway and bridge Dockerfile targets and pushed to ghcr.io/moustafa-elgammal/gamewarden and ghcr.io/moustafa-elgammal/gamewarden-bridge, tagged with the version (without the v) and latest (not for pre-releases).
    • Each image is signed by digest with cosign (keyless), gets a provenance attestation pushed to the registry, and an SPDX SBOM attached to the release as gamewarden-image.spdx.json and gamewarden-bridge-image.spdx.json.

Only this job has write permissions. Third party actions are pinned by commit SHA.

Replace v0.1.0 and the file name with yours. Signatures are keyless, so you check who signed: this repository’s release workflow, run for a v* tag.

Use cosign 3 or later. The workflow signs with cosign 3, which keeps image signatures as OCI referrers and writes a v0.3 Sigstore bundle: cosign 2 reports “no signatures found” for the images, and before 2.6 it cannot read the bundle either. Without a local install, docker run --rm gcr.io/projectsigstore/cosign:v3.0.2 verify ... works for the images.

Terminal window
ID='^https://github.com/Moustafa-Elgammal/gamewarden/\.github/workflows/release\.yml@refs/tags/v.*$'
ISSUER=https://token.actions.githubusercontent.com

Binaries. Download the archive, checksums.txt and checksums.txt.sigstore.json.

Terminal window
cosign verify-blob checksums.txt \
--bundle checksums.txt.sigstore.json \
--certificate-identity-regexp "$ID" --certificate-oidc-issuer "$ISSUER"
sha256sum --ignore-missing -c checksums.txt # on macOS: shasum -a 256 --ignore-missing -c checksums.txt
gh attestation verify gamewarden_0.1.0_linux_amd64.tar.gz --repo Moustafa-Elgammal/gamewarden

Images.

Terminal window
cosign verify ghcr.io/moustafa-elgammal/gamewarden:0.1.0 \
--certificate-identity-regexp "$ID" --certificate-oidc-issuer "$ISSUER"
gh attestation verify oci://ghcr.io/moustafa-elgammal/gamewarden:0.1.0 --repo Moustafa-Elgammal/gamewarden

The same commands work for gamewarden-bridge. For production, pin an image by digest (ghcr.io/moustafa-elgammal/gamewarden@sha256:...).

SBOMs. Each archive has a <archive>.spdx.json file on the release page, and each image has gamewarden-image.spdx.json or gamewarden-bridge-image.spdx.json. They are plain SPDX JSON.

Version. gateway --version, gwctl version and gwbridge --version print the release.