Releasing
Releases are triggered by a v* git tag. The .github/workflows/release.yml workflow then:
- Preflight. Fails the release before any build when the tag (minus its
v) differs from theversioninCargo.toml, so an image never reports a version other than its tag. It also decides which moving tags this release may move (below). - Reuses the tested
mainimage. The tag sits on a commitmainCI is already building, so the release waits for thatci.ymlrun (up to 40 minutes):- Green — its
sha-<7>multi-arch manifest, the image the quality jobs gated and the Image Updater deployed, is re-tagged: the release index points at the very per-arch images CI tested (same per-arch digests). The index digest itself differs fromsha-<7>'s, because the release adds its own annotations (below). - Red (failed or cancelled) — the release is blocked and fails with an error. Nothing ships from a commit CI rejected; fix it and tag the next patch.
- No
ci.ymlpush run for the commit (after a 2-minute grace), or a green run whosesha-<7>image is missing from either registry — the release is blocked too. Nothing is built from the tag: an image no test ran against never ships. (Preflight has already refused a tag whose commit is not onmain.) - An Actions API error, or a run still going after 40 minutes, fails the job; re-run it.
- Green — its
- Tags it
X.Y.Zand, where preflight allows,X.Y,Xandlatest. - Pushes the same tag set to two registries:
ghcr.io/developerz-ai/db-mcp-gateway(the public artifact) and a DigitalOcean Container Registry mirror (the in-cluster source the ArgoCD Image Updater tracks). - Once the image is published and signed, packages
deploy/helm/db-mcp-gatewayat the release version (chart version andappVersion), pushes it tooci://ghcr.io/developerz-ai/db-mcp-gateway/charts/db-mcp-gateway, signs it (cosign keyless) and attests its provenance. If this job fails the image stays published and the GitHub Release is not created; re-run the job. A re-run reuses the chart the same commit already pushed. A version already published with other content fails instead of moving, and so does one the registry cannot say is absent. - Creates a GitHub Release with auto-generated notes.
GHCR is the public distribution channel because this is an open-source project — public images are free, unmetered for pulls, and don't have Docker Hub's rate limits.
Moving tags only move forward
X.Y.Z is always pushed. The moving tags move only when this tag is the highest released semver in their line, ranked over every vX.Y.Z tag in the repository:
| Tag | Moves when the release is the highest… |
|---|---|
latest | of all releases |
X | in major X |
X.Y | in minor X.Y |
The tagged commit must be on main (preflight refuses any other). So a v1.6.1 tagged there after v2.0.3 gets 1.6.1, 1.6 and 1, but latest stays on 2.0.3. The GitHub Release's "Latest" badge (make_latest) follows the same rule. Prereleases move none of them.
Cutting a release
main takes changes through pull requests only — no direct pushes.
# 1. Bump the version on a branch and open a PR
git switch -c release/X.Y.Z
sed -i '0,/^version = .*/s//version = "X.Y.Z"/' Cargo.toml
cargo update -w
git add Cargo.toml Cargo.lock
git commit -m "chore(release): X.Y.Z"
gh pr create --fill
# 2. After the PR is merged, tag the merge commit on main and push the tag
git switch main && git pull
git tag -a vX.Y.Z -m "vX.Y.Z"
git push origin vX.Y.Z
Watch the workflow at https://github.com/developerz-ai/db-mcp-gateway/actions. When it finishes:
ghcr.io/developerz-ai/db-mcp-gateway:X.Y.Zis pullable.ghcr.io/developerz-ai/db-mcp-gateway:latestpoints at it, if it is the highest release.helm show chart oci://ghcr.io/developerz-ai/db-mcp-gateway/charts/db-mcp-gateway --version X.Y.Zanswers. GHCR creates a new package private: after the first chart publish, an owner makes it public once in the package settings.- A GitHub Release exists with the changelog.
Versioning
Semver. Pre-1.0 we don't promise compat between minors — 0.x.y to 0.(x+1).0 may break config schema, MCP tool surface, or audit log shape. The release notes will call out any break.
Post-1.0:
- Patch (
1.2.3→1.2.4) — no behavior changes a config has to react to. - Minor (
1.2.x→1.3.0) — additive only: new tools, new config keys (always with safe defaults), new sinks. - Major (
1.x.y→2.0.0) — breaking change. Documented migration path in release notes.
Prereleases
v1.2.3-rc1, v1.2.3-beta1 etc. push with the literal tag (1.2.3-rc1) and do not move latest, X or X.Y. Cargo.toml must carry the same prerelease version, or preflight fails. Use these for previews against a staging gateway.
Image provenance
The image is built once, from a clean checkout, by ci.yml on the main push; release.yml only re-tags it. Each per-arch image carries a BuildKit SBOM and max-mode SLSA provenance. release.yml then signs the release index (cosign keyless, the workflow's own OIDC identity) and attests its build provenance, in both registries, before latest moves; the Helm chart is signed and attested the same way. Verify the image against its own tag and deploy the digest that was verified (the chart: Kubernetes):
image=ghcr.io/developerz-ai/db-mcp-gateway
digest=$(docker buildx imagetools inspect "$image:X.Y.Z" --format '{{json .Manifest}}' | jq -r .digest)
cosign verify "$image@$digest" \
--certificate-identity https://github.com/developerz-ai/db-mcp-gateway/.github/workflows/release.yml@refs/tags/vX.Y.Z \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
&& echo "deploy $image@$digest"
Image labels on a reused image
The per-arch image config labels are written at build time, so a reused image keeps the ones ci.yml gave it: org.opencontainers.image.version there is the CI per-arch tag (linux-amd64-<sha>). Changing a config label would change the digest — it would no longer be the tested image — so the release identity is set on the multi-arch index instead: annotations org.opencontainers.image.version = X.Y.Z, org.opencontainers.image.revision = the tagged commit, org.opencontainers.image.source = the repository. db-mcp-gateway --version reports X.Y.Z either way (preflight checked it against Cargo.toml).
Yanking a release
Don't delete tags. To pull a broken release out of circulation:
- Cut the next patch with the fix.
latestmoves to the new patch automatically on tag push, as long as it is the highest release.- Note the yank in the next release's notes.
Deleted tags break anyone who pinned to that version. Cutting a forward fix is always safer.