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.
The files
Section titled “The files”| 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 |
What a release contains
Section titled “What a release contains”- Ten archives.
zentriandzentri-serverfor Linux and macOS on amd64 and arm64, and for Windows on amd64. The names carry no version, such aszentri_linux_arm64.tar.gzorzentri_windows_amd64.zip, soreleases/latest/download/<name>always works. The release tag is the version. - An SPDX JSON SBOM for each archive, from Syft.
checksums.txtover the archives and SBOMs, andchecksums.txt.sig, its Ed25519 SSH signature in the namespacezentri-release.- The
zentri-serverimage forlinux/amd64andlinux/arm64, built fromserver/Dockerfiletargetrelease, for GHCR. On publish, cosign signs it keyless. - A Homebrew cask for
zentri-repo/homebrew-tap. It installszentriand linksztto 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.
Why SSH signatures
Section titled “Why SSH signatures”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.
Run the dry run
Section titled “Run the dry run”make release-dry-runIt 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:
- runs
.goreleaser.yamlas a snapshot, signed with a throwaway key; - checks each archive’s contents, each binary’s target,
CGO_ENABLED=0, the build tags, and the stamped version; - checks the checksums and the signature, and that a changed file fails them;
- checks each SBOM, the cask, and each image’s platform and
--version; - tests
scripts/check-release-key.sh; - installs from
dist/withinstall.shover127.0.0.1, both the latest and a pinned version, and runszentriandzt.
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.
The release workflow
Section titled “The release workflow”| 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.
The cgo check
Section titled “The cgo check”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/zentriorbin/zentri-serverwas not built withCGO_ENABLED=0;- a build in
.goreleaser.yamldoes not setCGO_ENABLED=0, or thezentribuild’s tags differ from theMakefile’s; - the build tags in
.golangci.ymldiffer, so lint would read a build Zentri does not ship; - a
go buildinserver/Dockerfiledoes not setCGO_ENABLED=0; zentri-serverlinks the tree-sitter parser, which only the CLI uses.
Not done yet
Section titled “Not done yet”- 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.ps1has 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.