Thurbox releases, packaging and installers
Working reference indexed by AGENTS.md. The rationale behind these decisions is owned by the docs under docs/; a change that invalidates what this says updates it in the same PR.
Release Process
Releases are fully automated via GitHub Actions. No version commits
are created - version is determined by git tags only.
How It Works
Every push to main automatically triggers the release workflow:
- Commit Analysis: Analyzes all commits since last tag using cocogitto
- Release Decision — a release needs both gates to pass:
- Commit type (
check-release'sparsestep): commits must include
feat, fix, or perf. Only docs/chore/ci commits → no release.
- Artifact relevance (
check-release'sshippedstep): the diff since
the last tag must touch something a user installs: a path the
SHIPPED_PATHS regex in cd.yml matches. examples/ is there although
no binary carries all of it: a bare-name install resolves against the
release tag, so a change never tagged is one nobody can install. ui/
and examples/lua/ are include_str!d into the binary. Commit type alone
over-releases: Renovate labels a GitHub-Actions pin bump fix(deps) and
the website is versioned feat(ui)/fix(ui). Such commits stay in history
and ride along in the next real release's changelog.
- The gate is evaluated over the whole span since the last tag, not the
single push, so a website-only push landing on an unreleased src/ commit
still cuts the release it owes. A forced workflow_dispatch version
skips the relevance gate — an explicit human cut is always honoured.
- Release line (
check-release'slinestep,scripts/ci/release-line.sh):
the version's major must equal RELEASE_LINE in
src/update/version_check.rs, or the run fails before tagging — so a stray
BREAKING CHANGE: footer cannot cut the next major. The step also decides
channels (below). Rules: docs/thurbox/releasing.md, "v2 and v3".
Before that, the same script holds every release while the tree carries
.github/release-hold (held=true: a clean skip on a push or a dispatch);
main releases 3.x and carries no hold ("The v3 hold").
- Automated Release (if needed):
- Determines semantic version (feat→minor, fix/perf→patch, breaking→major,
which the release-line step then refuses)
- Creates lightweight git tag:
v{version}(e.g., v1.0.0) - Pushes tag to origin
- Builds binaries for 5 targets (4 Unix
.tar.gz+ 1 Windows.zip;
version passed via environment variable)
- Generates changelog from commits
- Publishes GitHub Release with binaries and release notes
Version Management
- Cargo.toml version: Always
0.0.0-dev(static development marker) - Real version: Determined by release workflow (v1.0.0, v1.1.0, etc.)
- Build-time injection:
build.rsusesTHURBOX_RELEASE_VERSIONenvironment
variable (set by workflow) to inject version into binary
- Development builds: Show
0.0.0-dev(whenTHURBOX_RELEASE_VERSIONnot set) - Release builds: Show actual version (e.g.,
1.0.0) via env variable from workflow - Explicit cuts:
cog bump --autocomputes the next version from commits and
works for every ordinary release (at 1.x+, a breaking change correctly bumps
the major). To cut a specific version that --auto can't reach — the only
way across a major boundary from a 0.x line, or any one-off — dispatch the
Release workflow (cd.yml) with the version input (e.g. 1.0.0); it runs
cog bump --version <v> instead of --auto.
Release Artifacts
Each release includes:
- Binaries for 5 targets:
thurbox-v{ver}-x86_64-unknown-linux-gnu.tar.gzthurbox-v{ver}-x86_64-unknown-linux-musl.tar.gzthurbox-v{ver}-aarch64-unknown-linux-musl.tar.gz(Graviton, Ampere,
Raspberry Pi, Asahi; built with cross like the x86_64 musl leg, and
pinned before release by CI's arm-clippy job on ubuntu-26.04-arm)
thurbox-v{ver}-aarch64-apple-darwin.tar.gzthurbox-v{ver}-x86_64-pc-windows-msvc.zip(the Windows artifact
extracted by install.ps1 / packaged by Chocolatey + winget)
- Each archive holds
thurbox,thurbox-cli,fleet,runtime-mux,
workspace-git and LICENSE: the list is BINARIES in
scripts/ci/release-archive.sh, the one source cd.yml builds and packs from
thurbox-{ver}-sha256sums.txt(SHA256 sums, nov; written by
release-archive.sh --sums). A 3.x release never ships
thurbox-v{ver}-checksums.txt, the name every 2.x updater fetches first
(docs/thurbox/releasing.md, rule 1); the installers fall back to it only
for a pinned 2.x release
- Changelog with categorized commits
Distribution Packages
After the GitHub Release is published, cd.yml also updates the downstream
package channels (each gated on its secret, skipped on forks, and run only
when channels is true: the version is the newest tag of
PACKAGE_CHANNELS_MAJOR, 2. These names carry 2.x for good, from v2.x's
own cd.yml. A 3.x release skips every channel job; 3.x ships through the
GitHub Release, the installers and the Nix flake until it gets names of its
own):
- Homebrew (
publish-homebrew): bumpsversion/sha256in
packaging/homebrew/Formula/thurbox.rb (via packaging/homebrew/bump-formula.py,
reading the release sums file) and pushes it to the
Thurbeen/homebrew-thurbox tap over SSH. Needs the HOMEBREW_TAP_DEPLOY_KEY
secret (a write deploy key on the tap repo; the org blocks cross-repo PATs).
Install: brew install thurbeen/thurbox/thurbox. Supports macOS arm64
(aarch64-apple-darwin) + Linux x86_64/aarch64
(x86_64-unknown-linux-musl, aarch64-unknown-linux-musl).
- AUR (
publish-aur): bumps + pushesthurbox/thurbox-binPKGBUILDs.
thurbox-bin carries per-arch source_<arch>/sha256sums_<arch> arrays
(x86_64, aarch64), all recomputed by updpkgsums.
Needs AUR_SSH_PRIVATE_KEY.
- Chocolatey (
publish-chocolatey): bumps<version>in
packaging/chocolatey/thurbox.nuspec and $url64/$checksum64 in
tools/chocolateyinstall.ps1 (via packaging/chocolatey/bump-nuspec.py,
reading the release sums file), then choco pack + choco push to the
community repo. Runs on windows-latest; needs the CHOCOLATEY_API_KEY
secret. New versions go through community-repo moderation.
Install: choco install thurbox. Windows x86_64 only.
Throttled to one push per THROTTLE_DAYS (30d) window because the
community repo moderates + rate-limits every push and can't keep up with
thurbox's per-feat/fix/perf cadence (versions pile up → choco push
returns 403). The job queries the community OData feed
(community.chocolatey.org/api/v2/Packages()) for the last-published
version's age; younger than the window ⇒ skip the push, exit green with a
::warning:: (patch releases coalesce into the next monthly Chocolatey
version — the binary still ships immediately via GitHub Releases +
Homebrew/AUR/winget). A residual 403/409 at push time is likewise caught
and exits green; only a genuine failure (bad package, auth) fails red — so a
backed-up channel never turns the whole release red.
- winget (
publish-winget): bumpsPackageVersion/InstallerUrl/
InstallerSha256/ReleaseNotesUrl in the three manifests under
packaging/winget/manifests/ (via packaging/winget/bump-manifests.py,
reading the release sums file), then wingetcreate submits the set as a
PR to microsoft/winget-pkgs. Runs on windows-latest; needs the
WINGET_TOKEN secret (a public_repo PAT owning a fork of
microsoft/winget-pkgs). New versions go through winget-pkgs PR
validation + review.
Attempts every release (Chocolatey's shape), paced by the queue rather
than a calendar: winget-pkgs is manually moderated — each submit opens a PR
a human must review, and thurbox's per-feat/fix/perf cadence buried the
maintainers. So the decision step hands our own thurbox PRs (via gh pr list, any state) to
packaging/winget/submit-decision.py decide, which skips green with a
::warning:: while one is still open — wingetcreate cannot update a
pending PR, so a second would only lengthen the queue — and also honours
THROTTLE_DAYS, kept as a knob but defaulted to 0 (set 30 to restore the
monthly window).
Before submit, `gh repo sync <account>/winget-pkgs --source
microsoft/winget-pkgs` brings the token account's fork up to date, retrying
with --force (hard reset of its default branch) when it has diverged:
wingetcreate's own auto-sync is fast-forward only. The fork is a
submission staging area (each submission gets its own branch), so a reset
destroys neither work nor an open PR.
A submit rejected by the channel (rate limit, version already pending)
warns and exits green via submit-decision.py after-submit, which also reports
whether a PR was opened — the flag the close-superseded-PRs step is gated
on, because a deferred submission exits green having opened none and cleanup
keyed off the pre-submit decision would close the pending PR and leave the
channel with nothing. Anything else fails
the job — but continue-on-error is on the job, so winget can never redden
the Release run. bats packaging/winget/winget.bats covers both
decisions and the manifest bump. As second-line cleanup for a PR that still
stacks (e.g. a manual dispatch), a follow-up gh pr close closes every older
still-open Thurbeen.thurbox PR from the token account (wingetcreate's
--replace only supersedes a published manifest version, not a pending PR;
best-effort, never fails the release).
The release zip is a zip installer with
NestedInstallerType = portable (PATH aliases thurbox/thurbox-cli, no
MSI). Install: winget install Thurbeen.thurbox. Windows x86_64 only.
- Nix (
flake.nix,nix/package.nix): not a release channel, and
nothing in cd.yml touches it. The flake cannot read tags, so it builds any
ref as 0.0.0-unstable-<commit date> (base from Cargo.toml with -dev
dropped, commit hash appended in THURBOX_RELEASE_VERSION). No -dev keeps
the dev_build cfg off, so it uses the release socket and data dir; the
0.0.0 keeps is_dev_build() true, so auto-update never tries to rewrite
the read-only store. Pinning a release means pointing the flake input at its
tag. CI's nix job runs nix flake check --all-systems and nix build;
flake.lock moves only when someone runs nix flake update.
See packaging/README.md for the full packaging overview.
Commit Types and Versioning
Thurbox 1.0+ follows Semantic Versioning:
- feat: Minor version bump (1.x.0)
- fix, perf: Patch version bump (1.0.x)
- docs, chore, ci, style, test: No release (appear in next version)
- BREAKING CHANGE: Major version bump (x.0.0) — refused by the
release-line step unless RELEASE_LINE already names that major
cog bump --auto computes a major bump from a breaking change (at 1.x+; on a
0.x line cocogitto maps breaking to a minor bump instead), but a new major
is only ever cut deliberately: a reviewed PR raising RELEASE_LINE, then the
explicit-version Release dispatch. Maintenance of the older line continues on a
v<N>.x branch, dispatched with an explicit version.
Installation Script
Linux / macOS — scripts/install.sh:
curl -fsSL https://raw.githubusercontent.com/Thurbeen/thurbox/main/scripts/install.sh | sh
Windows — scripts/install.ps1 (PowerShell):
irm https://raw.githubusercontent.com/Thurbeen/thurbox/main/scripts/install.ps1 | iex
Both installers share the same shape: ASCII banner, platform detection, version
resolution (GitHub API → releases-page scrape fallback), SHA256 checksum
verification, extract, post-install hints. From the same release, install.sh
pulls the .tar.gz for x86_64-unknown-linux-musl /
aarch64-unknown-linux-musl / aarch64-apple-darwin (Linux x86_64 + aarch64
and Apple-silicon macOS — the only platforms it installs onto; it
errors cleanly on any other), while install.ps1 pulls
thurbox-<ver>-x86_64-pc-windows-msvc.zip (the Windows artifact built by
cd.yml) and extracts it with the built-in Expand-Archive (no tar needed).
ARM64 Windows installs the x86_64 build (runs under x64 emulation).
Fleet alone. install.sh --fleet-only (curl … | sh -s -- --fleet-only),
install.ps1 -FleetOnly, or THURBOX_FLEET_ONLY=1 for either, installs only
FLEET_BINARIES from scripts/ci/release-archive.sh (fleet, runtime-mux,
runtime-herdr, workspace-git; --fleet-binaries prints them, and install.bats holds them
to a subset of BINARIES) and prints only Fleet's next steps. 0 turns the
variable off, an explicit -FleetOnly:$false wins over it, and a fleet-only
install the variable chose warns that it skipped thurbox. The documented
Windows form is & ([scriptblock]::Create((irm …/install.ps1))) -FleetOnly,
which leaves no variable behind in the session. The in-app
updater lives in thurbox and thurbox-cli, so a fleet-only install is updated by
re-running the installer (docs/thurbox/config.md, auto-update).
install.sh (POSIX sh) specifics:
- Colorized output (auto-disabled when stderr is not a TTY,
NO_COLORis set,
or TERM=dumb); platforms Linux/macOS × x86_64/aarch64
- No external deps beyond standard tools (curl/wget, tar, sha256sum/shasum)
- Env vars:
VERSION=v1.0.0,INSTALL_DIR=/path(default~/.local/bin),
THURBOX_FLEET_ONLY=1 (or the --fleet-only argument; any other argument
is refused),
DOWNLOAD_URL (default https://github.com/<REPO>/releases/download; a
mirror, or the local copy CI's install-e2e serves)
- Installs the release into
<prefix>/lib/thurbox/releases/<version>/bin/
(<prefix> is INSTALL_DIR's parent), points current at it and the
release it replaces at previous and install-dir at INSTALL_DIR, and
links each program in INSTALL_DIR to current/bin/: the layout the updater writes (docs/thurbox/config.md,
"Releases"). A fleet-only install keeps the programs of the release it
replaces that it does not ship.
- Non-interactive (safe pipe-to-shell), cleanup via
trap - Tested by
scripts/install.bats(bats-core, ~40 tests, a fake release
installed end to end among them; CI install-script job)
install.ps1 (PowerShell 5.1+) specifics:
- Parameters
-Version/-InstallDir/-Repo/-FleetOnly, or the matching
THURBOX_VERSION / THURBOX_INSTALL_DIR / THURBOX_REPO /
THURBOX_FLEET_ONLY env vars, plus THURBOX_DOWNLOAD_URL (env vars
are the reliable path for the irm | iex form, which can't pass parameters);
default install dir %LOCALAPPDATA%\Programs\thurbox
- Adds the install dir to the user
PATH([Environment]::SetEnvironmentVariable(... 'User'))
when missing; reflects it into the current session
- ASCII-only source (no BOM needed; survives
irm | iexdecoding on Windows
PowerShell 5.1); Write-Host for UI is intentional (Write-Output would leak
into the iex pipeline)
- Updating while thurbox runs works:
Install-Archiveunpacks into a staging
directory and renames each installed file to .<name>.old before moving the
new one in, because Windows refuses to delete a running executable (what
Expand-Archive -Force does) but allows renaming it. A backup still running
is removed by the next run; one that cannot be moved fails naming the PIDs
of the shipped programs to close (fleet up is the usual one)
- The helpers (
Get-Target,Get-ExpectedChecksum,Install-Archive) are
guarded by $env:THURBOX_PS_TEST so the file can be dot-sourced for testing
without running the installer
- Tested by
scripts/install.Tests.ps1(Pester 5; CIinstall-script-psjob,
on ubuntu with pwsh and on Windows with both pwsh and Windows PowerShell
5.1 — the running-thurbox.exe cases only run on Windows) — the PowerShell
mirror of install.bats
Clean install (scripts/ci/install-e2e.sh, CI install-e2e job): packs a
debug build with release-archive.sh, serves it as release assets on
127.0.0.1, and runs the real installer into an empty home with no shipped
program on PATH — in a bare Debian container on Linux, on the runner on macOS
and Windows. Every program must then resolve to the install directory,
thurbox --version, thurbox-cli version, fleet version and fleet init must succeed, and
thurbox-cli doctor --json must report fleet, fleet-config and
runtime-mux ok; with no multiplexer on PATH (Windows: no psmux) the
multiplexer check is the only failure allowed. A second run per OS passes
--fleet-only: the installer's fleet-only mode into another empty home, where
thurbox and thurbox-cli must be absent, fleet version and fleet init must
succeed, and fleet doctor --json must report no failing check (with no
multiplexer on PATH, the mux/local runtime is the only failure allowed). Run it locally after
cargo build of the five programs:
`scripts/ci/release-archive.sh v0.0.0-ci <target> target/debug dist &&
scripts/ci/install-e2e.sh dist v0.0.0-ci`.