Internals
Releasing
How a version reaches users, and the gates in between.
Version numbers#
Semantic versioning (MAJOR.MINOR.PATCH, pre-releases like 2.0.0-rc.1). The single source of truth is .version in build.zig.zon; the git tag is v plus that string. The policy for what each part means is in
Versioning and Stability. Bump with scripts/bump_version.sh {patch|minor|major} (patch by default, minor for genuine new features).
The release gate#
scripts/release.sh is the local gate; run it before tagging.
| Step | Check |
|---|---|
| 1 | the version in build.zig.zon is valid semver, CHANGELOG.md has a ## [version] entry, the tag does not exist yet, the working tree is clean |
| 2 | zig fmt --check |
| 3 | zig build |
| 4 | zig build test — and no IR snapshot changed |
| 5 | zig build backend-differential-corpus-test — LLVM and QBE agree on the whole corpus |
| 6 | (with --stress) stress, both torture suites and the HTTP soak test |
| 7 | (with --tag) create vX.Y.Z, push main and the tag |
scripts/release.sh # checks only (a dry run)
scripts/release.sh --tag # checks, then tag and push
scripts/release.sh --tag --stressCI#
On every push to main, ci.yml runs the full suite on Linux x86-64, Linux aarch64 and macOS arm64 (all required) and a Windows job (the Debug zig build test corpus plus end-to-end smoke tests of both back ends). Extra workflows run the opt-in stress
suites and the external-integration fixtures (the Aether and Nyx frameworks compiled against the new compiler).
Publishing#
Pushing a v* tag triggers release.yml:
- Gate job — verifies that the tag,
build.zig.zonandCHANGELOG.mdagree, then waits for theci.ymlrun on the tagged commit and fails the release unless it succeeded. A red commit is never published. - Build jobs — build
noxc,noxlsp,noxrt.o,noxrt-freestanding.oand the standard library inReleaseFastfor macOS arm64, Linux x86-64, Linux arm64 and Windows x86-64 (with explicit-Dcpubaselines so the binaries run on older machines), bundleqbewhere applicable, and upload archives plus SHA-256 files to the draft GitHub release (opened by thecreate-releasejob). The Windows job also builds the installer (packaging/windows/nox.iss, Inno Setup) and runspackaging/windows/test-installer.ps1on it — silent install, reinstall (no duplicatePATHentry), uninstall, and a check that the user'sPATHis restored byte for byte — before uploadingnox-lang-<tag>-windows-x64-setup.exeand its SHA-256. A failing installer test stops the release. To iterate on the installer without cutting a release, push to a branch that changespackaging/windows/**(or run Windows installer manually): it builds the installer from an existing release's archive and runs the same test. Publishing is atomic. The release stays a draft, invisible tonoxc upgrade, the installers and the website, until every core archive (macOS arm64, Linux x86-64, Linux arm64, Windows zip and installer) is uploaded; only then thepublishjob flips it to public and marks it Latest. If any build job fails the release stays a draft, so a half-uploaded version is never visible — fix the cause and re-run the failed jobs. (Before v2.0.173 each job published the release as soon as its own archive landed, andnoxc upgradecould see a "latest" release whose archive for your platform did not exist yet and fail with HTTP 404.) The Homebrew, AUR, AppImage, Snap and site-image jobs run afterpublish. Signing and SBOM. Each build job signs its archives withactions/attest-build-provenance(keyless, GitHub/Sigstore) before uploading them; thepublishjob generatesnox-lang-<tag>-sbom.spdx.jsonwithscripts/gen_sbom.py, attaches it to the draft and signs it.gen_sbom.pyreads the SQLite, QBE and Zig versions from the repository and fails if one cannot be read, and CI runsgen_sbom.py --checkon every change. The attest steps are required: the release is a draft untilpublish, so a failed signing step never exposes a half-signed version, and re-running the failed job is enough. Users verify withgh attestation verify(Install). - Tags containing a
-(such asv2.0.0-rc.1) are published as pre-releases, sonoxc upgradeand the installers keep pointing at the latest stable release. - Homebrew tap job — for stable tags only, after the build jobs, it generates
Formula/noxc.rbfrom the release's.sha256files (scripts/update_homebrew_formula.py, templatepackaging/homebrew/noxc.rb.in) and pushes it tomburakmmm/homebrew-nox. It needs a repository secretHOMEBREW_TAP_TOKEN(a fine-grained personal access token with Contents: Read and write on that one repository); without it the job only warns and the release is unaffected. The tap's own CI then audits, installs and tests the formula on macOS arm64, Linux x86-64 and Linux arm64. - AUR job — for stable tags only, it builds the
noxc-binpackage from the release in a clean Arch Linux container (packaging/aur/test-in-arch.sh:makepkg,.SRCINFOidentical tomakepkg --printsrcinfo, install, run, upgrade guard, remove), then pushesPKGBUILDand.SRCINFO(scripts/update_aur_package.py, templatepackaging/aur/PKGBUILD.in) tossh://[email protected]/noxc-bin.git. The push needs a repository secretAUR_SSH_PRIVATE_KEY(the private half of an SSH key registered in your AUR account); without it only the container test runs. To iterate without a release, push to a branch that changespackaging/aur/**(or run AUR package manually). - AppImage jobs — x86-64 and aarch64, each on its own runner:
packaging/appimage/build-appimage.shassembles an AppDir from the release archive (checksum verified) and runsappimagetool;test-appimage.shruns the result (version,run, the QBE back end, thenoxlspdispatch, the upgrade guard) beforenoxc-<version>-<arch>.AppImageand its SHA-256 are uploaded to the release. No account or secret is involved. - Snap jobs — stable tags only, amd64 and arm64:
scripts/update_snap_package.pywritessnapcraft.yaml(classic confinement, built from the release archive withpatchelfso the binaries use the core24 libraries),snapcraft pack --destructive-modebuilds it andpackaging/snap/test-snap.shinstalls it with--classic, runs it and removes it; the.snapis attached to the release. If the repository secretSNAPCRAFT_STORE_CREDENTIALSexists (snapcraft export-login --snaps noxc --acls package_access,package_push,package_release -) the job also uploads to the Snap Store'sstablechannel; this needs the name registered (snapcraft register noxc) and classic confinement approved by the Snap Store reviewers first. The upload step never fails the release. To iterate on AppImage, Snap or AUR packaging without a release, push to a branch that changespackaging/<format>/**(or run the matching workflow manually): each builds from the newest release that has all the needed assets and runs the same tests.
Because the workflow concurrency cancels a superseded CI run, a later push can cancel the CI run of an earlier tag and make that tag's release fail its gate; push one release at a time and wait for CI.
Installers and upgrades#
install.sh and install.ps1 download the archive for the platform from the latest GitHub release. noxc upgrade replaces the running installation with the latest (or a requested) release after verifying the checksum.
Documentation and website#
The documentation in docs/ is built into the website; the site and the noxpkg registry are deployed from services/. Docs are checked in CI-adjacent tooling (scripts/check_docs.py) so a release never ships examples that do not compile.
A stable release also publishes the website image to GHCR (the site-image job), and the production machine picks it up on its own; see Deploying.