Skip to content

Release process

Zentri builds its release artifacts with GoReleaser and checks them end to end with make release-dry-run. Nothing has been published: no release, image, Homebrew cask, or installer site. release.yml and deploy-web.yml have never run. ADR-0014 records the design.

File What it does
.goreleaser.yaml Builds the release: archives, SBOMs, checksums, the checksum signature, the zentri-server image, and the Homebrew cask
scripts/release-dry-run.sh Runs the real config as a snapshot, checks every artifact, and installs from it. make release-dry-run calls it.
scripts/check-release-key.sh Checks that a signing key is the key both installers trust
deploy/install/install.sh, install.ps1 The installers, with the release public key embedded
deploy/install/test.sh Runs the installers against signed fake releases. make test-install calls it.
.github/workflows/release.yml The dry run by hand, and the gated release on a tag
scripts/check-cgo.sh Checks that both binaries stay pure Go, and that the release config matches the Makefile
  • Ten archives. zentri and zentri-server for Linux and macOS on amd64 and arm64, and for Windows on amd64. The names carry no version, such as zentri_linux_arm64.tar.gz or zentri_windows_amd64.zip, so releases/latest/download/<name> always works. The release tag is the version.
  • An SPDX JSON SBOM for each archive, from Syft.
  • checksums.txt over the archives and SBOMs, and checksums.txt.sig, its Ed25519 SSH signature in the namespace zentri-release.
  • The zentri-server image for linux/amd64 and linux/arm64, built from server/Dockerfile target release, for GHCR. On publish, cosign signs it keyless.
  • A Homebrew cask for zentri-repo/homebrew-tap. It installs zentri and links zt to it.

Every build sets CGO_ENABLED=0 and -trimpath, and stamps the version, commit, and date into pkg/version. The zentri build uses the same tree-sitter tags as the Makefile.

An installer cannot check a signature with a tool it has not installed yet. ssh-keygen signs and verifies files since OpenSSH 8.1. It ships with macOS, with the OpenSSH client most Linux hosts have, and as the Windows OpenSSH Client feature. Both installers check the signature with ssh-keygen -Y verify, then the archive’s SHA-256 against the signed list, and stop before they write anything when a check fails.

Anyone with OpenSSH 8.1 or later can check a release by hand with the public key in install.sh.

Terminal window
make release-dry-run

It needs Go, Docker with buildx for linux/amd64 and linux/arm64, python3, and ssh-keygen. GoReleaser v2.20.3 needs Go 1.27.4, which go run fetches through GOTOOLCHAIN. If the pinned Syft is not on your PATH, the script builds it once with go install, which takes a few minutes.

The dry run publishes nothing. It:

  1. runs .goreleaser.yaml as a snapshot, signed with a throwaway key;
  2. checks each archive’s contents, each binary’s target, CGO_ENABLED=0, the build tags, and the stamped version;
  3. checks the checksums and the signature, and that a changed file fails them;
  4. checks each SBOM, the cask, and each image’s platform and --version;
  5. tests scripts/check-release-key.sh;
  6. installs from dist/ with install.sh over 127.0.0.1, both the latest and a pinned version, and runs zentri and zt.

It removes the images it loaded.

make test-install is part of make test. It runs install.sh against signed fake releases on 127.0.0.1, with keys made for each run, and runs install.ps1 through the same cases when pwsh is on your PATH.

Trigger What runs
Run by hand (workflow_dispatch) make release-dry-run, with no secrets
A v* tag The release, only when the repository variable ZENTRI_RELEASE_ENABLED is true, and only after a reviewer approves the release environment

The release environment holds the only signing key and the tap token. The job checks the signing key against both installers before GoReleaser runs, writes the key to a 0600 file, and removes it in an always() step. The GitHub release is a draft that the owner publishes by hand.

Only the release job gets contents: write, packages: write, and id-token: write. Every other job reads only. Third-party actions in release.yml and deploy-web.yml are pinned by commit, and make lint runs actionlint on every workflow.

make build-go runs scripts/check-cgo.sh after it builds the binaries. It fails when:

  • a dependency of either binary has cgo files on a release target, unless the script allows it;
  • bin/zentri or bin/zentri-server was not built with CGO_ENABLED=0;
  • a build in .goreleaser.yaml does not set CGO_ENABLED=0, or the zentri build’s tags differ from the Makefile’s;
  • the build tags in .golangci.yml differ, so lint would read a build Zentri does not ship;
  • a go build in server/Dockerfile does not set CGO_ENABLED=0;
  • zentri-server links the tree-sitter parser, which only the CLI uses.
  • No release has been tagged or published, and no image, cask, or deploy exists.
  • The installers hold a placeholder release key, which no signature matches, until the owner makes the real key.
  • Keyless cosign has not run, since it needs the OIDC token of a GitHub Actions run.
  • install.ps1 has not run on Windows. It ran under PowerShell 7 on Linux.
  • The binaries are not signed or notarized by Apple. The cask removes macOS’s quarantine flag, so you trust the tap and its checksum in place of notarization.
  • An anonymous install needs a public repository. Release files of a private repository need a token.