Releasing
Version rules
Section titled “Version rules”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.
Cut a release
Section titled “Cut a release”- Make sure
mainis green andmake fmt vet test lint vulnpass in Docker. - Run
make deploy-check workflows-check release-checkandmake release-snapshot(everything runs in containers; the snapshot publishes nothing and writesdist/). - Update
CHANGELOG.mdand commit it. - 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 nolatestimage 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 tagrc.2. - 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. - Watch the
releaseworkflow. When it ends, open the release page and check the files below. The binaries and the images both print the version without thev(0.1.0).
What the workflow does
Section titled “What the workflow does”The release workflow runs on a tag matching v*.
- test:
go vetandgo test -race ./...with real Redis and Postgres. - publish, only if the tests pass:
- GoReleaser builds
gateway,gwctlandgwbridgefor linux, darwin and windows on amd64 and arm64, archives them, writeschecksums.txt, writes an SPDX SBOM for each archive (syft), and signschecksums.txtkeyless 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
gatewayandbridgeDockerfile targets and pushed toghcr.io/moustafa-elgammal/gamewardenandghcr.io/moustafa-elgammal/gamewarden-bridge, tagged with the version (without thev) andlatest(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.jsonandgamewarden-bridge-image.spdx.json.
- GoReleaser builds
Only this job has write permissions. Third party actions are pinned by commit SHA.
Verify a download
Section titled “Verify a download”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.
ID='^https://github.com/Moustafa-Elgammal/gamewarden/\.github/workflows/release\.yml@refs/tags/v.*$'ISSUER=https://token.actions.githubusercontent.comBinaries. Download the archive, checksums.txt and checksums.txt.sigstore.json.
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.txtgh attestation verify gamewarden_0.1.0_linux_amd64.tar.gz --repo Moustafa-Elgammal/gamewardenImages.
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/gamewardenThe 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.