Releasing¶
tau ships as three PyPI distributions, tau-core, tau-tui and tau-guard, released
together with the same version. A release is one tag away: push vX.Y.Z and the release
workflow builds the packages, smoke-tests the wheels, publishes them to PyPI through trusted publishing and creates
the GitHub release with the files attached. For the same tag the app workflow builds the Mac
app, signs it, uploads tau.dmg and the updater's files to the public downloads at
https://tau.getporti.com/download/ and attaches them to that release. The docs site
deploys itself on every push to main. This is the "installable by anyone" half of
ADR 0006.
Versioning¶
- The packages carry the same version.
tau-tuiandtau-guarddepend ontau-coreand are released with it, even when only one of them changed. - The tag is
vplus the version inpackages/tau-core/pyproject.toml, for examplev0.3.0. The workflow refuses a tag that does not match it, and atau-tuiortau-guardversion that differs fromtau-core. - Versions follow PEP 440. A pre-release such as
0.3.0rc1is taggedv0.3.0rc1and becomes a GitHub pre-release.
Cut a release¶
Before you start
main is green in CI and everything you want to ship is merged. Tags are cut from main.
-
Bump every version (this also updates
uv.lock): -
Commit and tag:
-
Watch the run under Actions → release. The
buildjob checks the tag against the version, builds the sdists and wheels, installs them into a fresh virtualenv and runstau --help,tau version,tau init --yes,tau doctor,tau components, a scriptedtau chat,tau tui --helpandtau guard status, then repeats the documenteduv tool install.publishuploads each package (one job per package) andgithub-releasecreates the release. Next to it, Actions → app builds the universaltau.app(Apple silicon and Intel) with the same version, signs it and attachestau.dmg,tau.app.tar.gz, its.sigandlatest.jsonto the release; whichever workflow gets there first creates the release. Itsdownloadsjob uploads the same files to the R2 buckettau-downloads, which the universe serves to signed-out visitors and to installed apps (below). -
Write the changelog. The release is created with notes generated from the pull requests and commits since the previous tag. Open it under Releases, edit the notes into a few lines a user can read (what changed for someone running
tau, what to do after upgrading) and save. -
Verify from a clean machine, or a scratch tool directory:
Something went wrong halfway
Rerun the workflow from the Actions tab: publishing skips files PyPI already has
(skip-existing) and the GitHub release is updated rather than duplicated. If the code
itself was wrong, fix it on main, bump to the next patch version and tag again; a
version that reached PyPI can never be uploaded twice.
Dry run¶
The same workflow without the upload. Under Actions → release → Run workflow pick main,
or the tag you are about to publish, and leave dry run ticked. From a shell:
gh workflow run release.yml --ref main # build, smoke test, artifacts
gh workflow run release.yml --ref v0.3.0 -f dry_run=false # publish an existing tag by hand
The built files are attached to the run as the dist artifact. The smoke test also runs
locally, against wheels built into a scratch directory:
uv build --package tau-core --out-dir /tmp/tau-dist
uv build --package tau-tui --out-dir /tmp/tau-dist
uv build --package tau-guard --out-dir /tmp/tau-dist
uv venv --python 3.12 /tmp/tau-venv
uv pip install --python /tmp/tau-venv/bin/python /tmp/tau-dist/*.whl
/tmp/tau-venv/bin/tau init --yes --home /tmp/tau-home --provider fake --language en
/tmp/tau-venv/bin/tau --home /tmp/tau-home doctor
printf '/status\nhello\n/quit\n' | /tmp/tau-venv/bin/tau --home /tmp/tau-home chat
The fake provider answers "Okay." and needs no credentials.
One-time setup¶
The Mac app: code signing and updates¶
app.yml signs every build of tau.app with one self-signed code-signing identity, so macOS
keeps the app's camera and notification permissions across updates: a permission belongs to
the app's designated requirement, and with one certificate that requirement names the
certificate rather than the build. It also signs the updater archive, which installed apps
check against the public key in apps/tau/src-tauri/tauri.conf.json. The app is not
notarised (ADR 0014 §6).
Create both once, on your own Mac, from the checkout:
It writes a certificate named "tau (self-signed)" as a p12 and the updater's key pair into
apps/tau/.signing/ (gitignored, owner-only), puts the updater's public key into
tauri.conf.json (commit that), and prints the commands that set the four repository secrets
from those files on stdin:
gh secret set MACOS_SIGNING_P12 < apps/tau/.signing/tau-signing.p12.base64
gh secret set MACOS_SIGNING_PASSWORD < apps/tau/.signing/tau-signing.p12.password
gh secret set TAURI_SIGNING_PRIVATE_KEY < apps/tau/.signing/updater.key
gh secret set TAURI_SIGNING_PRIVATE_KEY_PASSWORD < apps/tau/.signing/updater.key.password
Keep a copy of .signing/ in your password manager. A new certificate costs every user one
more camera prompt after the update that brings it; a new updater key needs a release with the
new public key before older installs can update past it. Without the secrets (a fork) the
workflow signs ad hoc and skips the updater files, with warnings. gh workflow run app.yml
--ref main is a dry run: build, sign and pack, with the files as the tau-app artifact.
The Mac app: public downloads (R2)¶
The repository is private, so the GitHub release's files cannot be downloaded by visitors or
by the updater. The universe Worker serves them instead from the private R2 bucket
tau-downloads, bound to it as DOWNLOADS (the endpoints).
The downloads job of app.yml uploads every tag's files there with
bunx wrangler r2 object put tau-downloads/<key> --file … --content-type … --remote, in this
order:
| Step | Keys | Served at https://tau.getporti.com/download/… |
|---|---|---|
| 1 | v<version>/tau.dmg, v<version>/tau.app.tar.gz |
v<version>/tau.dmg, v<version>/tau.app.tar.gz, cached for a year |
| 2 | tau.app.tar.gz, tau.dmg |
tau.app.tar.gz, tau.dmg: the latest release, cached for five minutes |
| 3 | latest.json |
latest.json: the updater's endpoint (tauri.conf.json) |
latest.json names the versioned archive (pack-release.sh writes
https://tau.getporti.com/download/v<version>/tau.app.tar.gz), and it is uploaded last, so an
upload that stops halfway never points installed apps at a missing file. A pre-release such as
v0.3.0rc1 gets only step 1. The GitHub release carries the same latest.json.
Set it up once:
- In the Cloudflare dashboard, open R2 Object Storage and enable R2 for the account.
-
Create the bucket, from a shell where
wrangleris logged in (bunx wrangler login):Leave it private: no public bucket URL and no custom domain; the universe serves it.
-
Bind the bucket to the universe (
r2_bucketsincloud/universe/wrangler.jsonc:{ "binding": "DOWNLOADS", "bucket_name": "tau-downloads" }) and deploy it. -
Give the repository a Cloudflare API token that may write to R2, and the account id. One token serves both this and the docs site (below): a custom token with Account · Workers R2 Storage · Edit and Account · Workers Scripts · Edit, limited to your account.
Without the two secrets the downloads job warns and uploads nothing; the release passes all
the same. After a release, curl -sI https://tau.getporti.com/download/tau.dmg from a
signed-out shell shows 200 with the new etag, and
curl -s https://tau.getporti.com/download/latest.json the new version.
PyPI: trusted publishing¶
No API token is stored on GitHub. The publish job presents its GitHub OIDC token to PyPI,
which answers with a short-lived upload token for the projects that trust this workflow
(trusted publishers). Configure it once per
project:
- Sign in to PyPI and open Publishing.
-
Under Add a new pending publisher (a project that does not exist yet is created by its first upload) fill in:
Field Value PyPI project name tau-coreOwner fportRepository name tauWorkflow name release.ymlEnvironment name pypi -
Repeat with the project name
tau-tuiand the environment namepypi-tui,tau-guardandpypi-guard,tau-netandpypi-net,tau-cloudandpypi-cloud, andtau-subandpypi-sub. PyPI accepts only one pending publisher per (repository, workflow, environment) tuple, so each package publishes from its own GitHub environment; the workflow already mapstau-core → pypi,tau-tui → pypi-tui,tau-guard → pypi-guard,tau-net → pypi-net,tau-cloud → pypi-cloudandtau-sub → pypi-sub. tau-net, tau-cloud and tau-sub keep their own version (0.1.0 at first) and are uploaded on every tag withskip-existing, so an unchanged version is a no-op: bump them when they change. - On GitHub, Settings → Environments → New environment →
pypi,pypi-tui,pypi-guard,pypi-net,pypi-cloudandpypi-sub(orgh api -X PUT repos/fport/tau/environments/pypiand the same for the others). Optional: add yourself as a required reviewer, so every tag waits for a click before anything is uploaded. The first run creates a missing environment; the reviewer rule is the reason to create it by hand.
Names must match exactly
PyPI compares the owner, repository name, workflow file name and environment name with
the claims in the OIDC token. A typo shows up as invalid-publisher in the publish job.
Fix the publisher on PyPI and rerun; no code change is needed.
The docs site on Cloudflare¶
.github/workflows/docs.yml builds the site with mkdocs build --strict on every push that
touches docs/** or mkdocs.yml, and deploys it as Cloudflare Workers static assets
(the successor of Cloudflare Pages) with wrangler deploy -c infra/docs/wrangler.jsonc. No
code runs at the edge; the Worker tau-docs only serves the uploaded files.
-
The first deploy creates the Worker. From a shell where
wrangleris logged in (npx wrangler login):The site is live at
https://tau-docs.<your-subdomain>.workers.devright away. -
For the automated deploy, create an API token (My Profile → API Tokens → Create Token → "Edit Cloudflare Workers" template, or a custom token with Account · Workers Scripts · Edit; add Account · Workers R2 Storage · Edit so the
appworkflow can upload the Mac app with the same token) and note the account id (dashboard sidebar). Store both as repository secrets:Without them the workflow only builds the site and keeps it as an artifact.
-
Once the domain's DNS is on Cloudflare (roadmap issue 022): Worker → Settings → Domains & Routes → add
docs.tau.<your-domain>. Cloudflare creates the DNS record and the certificate;site_urlinmkdocs.ymlalready points there.
Dry run
Actions → docs → Run workflow with deploy unticked builds the site without touching
Cloudflare; the built site/ is attached to the run as an artifact.
What the workflows check¶
| Check | Where | Fails when |
|---|---|---|
ruff check, ruff format --check, pytest, uv build |
ci.yml, every push and pull request |
lint, formatting or a test fails, or a package does not build |
mkdocs build --strict |
ci.yml and docs.yml |
a page listed in nav is missing or a link points nowhere |
| tag ↔ version | release.yml |
the tag is not v<tau-core version>, or tau-tui has another version |
| wheel smoke test | release.yml |
the tau command, its tui subcommand, the templates tau init writes or the entry points are missing from the wheels |
| setup smoke test | release.yml |
tau setup --yes --features tui,sub --no-install fails in a fresh virtualenv, tau setup status --json does not parse, or install.sh with the real uv and a tau setup that adds a feature (one uv tool install, then the re-execution) fail |
| the Mac app | ci.yml (job app, macOS) and app.yml |
a vitest, Rust test or clippy lint fails; the tag is not v<tau-core version>; the app is not universal; the signed app has no camera entitlement; the updater key is set but tauri.conf.json has no public key |
| public downloads | app.yml (job downloads) |
an upload to the R2 bucket tau-downloads fails; without CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID it warns and uploads nothing |