Maintainer Guide
Release process for zigc and zigtsc. Both CLIs follow the same pattern: bump the compiled-in version, push a tag, CI builds release binaries, users get the update via upgrade or brew upgrade.
Release checklist
This applies to both zigc and zigtsc.
1. Bump VERSION
Edit the VERSION constant in src/main.zig:
// zigc: src/main.zig line 5 // zigtsc: src/main.zig line 11 const VERSION = "0.3.0";
2. Commit and push
git add src/main.zig git commit -m "release: v0.3.0" git push
3. Tag and push
git tag v0.3.0 git push --tags
The v* tag triggers .github/workflows/release.yml, which cross-compiles for 4 targets and creates a GitHub Release with tarballs.
4. Wait for CI
Check the Actions tab. The release job builds:
aarch64-macos x86_64-macos aarch64-linux-gnu x86_64-linux-gnu
Each target produces a tarball: <tool>-<target>.tar.gz (e.g. zigc-aarch64-macos.tar.gz).
5. Update Homebrew formula
After the release is published, update the tap repo with the new version and sha256 hashes.
# For zigc: github.com/nathanjmorton/homebrew-zigc # For zigtsc: github.com/nathanjmorton/homebrew-zigtsc # In Formula/<tool>.rb, update: version "0.3.0" sha256 "..." # for each platform block
Get the sha256 for each tarball from the release page, or compute locally:
curl -sL <tarball-url> | shasum -a 256
6. Verify
# Self-update (shell script / build-from-source installs) zigc upgrade # Homebrew brew upgrade zigc # Confirm version zigc help # should show new version in behavior
How the upgrade command works
Both zigc upgrade and zigtsc upgrade follow the same logic:
1. curl GitHub API → /repos/{owner}/{repo}/releases/latest
2. Extract "tag_name" from JSON response
3. Compare against compiled-in VERSION constant
4. If newer: detect platform (comptime), build download URL
5. which <tool> → find binary location on PATH
6. If Homebrew path detected → print "use brew upgrade" and exit
7. curl tarball → /tmp, tar extract → overwrite binary
8. chmod +x, clean up tarballThe VERSION constant is compiled into the binary at build time. This is why bumping it is the first step — without a bump, the upgrade command thinks it's already up to date.
Architecture
src/main.zig VERSION constant + all CLI commands .github/workflows/ release.yml — triggered by v* tags install.sh Shell installer (downloads from GitHub releases) homebrew-*/ Separate tap repos with Formula/*.rb
The Homebrew tap repos are at nathanjmorton/homebrew-zigc and nathanjmorton/homebrew-zigtsc.