Skip to main content
Blitz
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

025 · Release

Continuous integration and releases (spec_025_release)

Status Implemented; on Bazel since 2026-09-27 (spec_028_monorepo)
Source .github/workflows/ci.yml, .github/workflows/release.yml, .github/release-footer.md, .github/dependabot.yml, release/BUILD.bazel, apps/electron/packaging/, build/, tools/
Depends on spec_001_setup, spec_028_monorepo, all feature specs

1. Purpose

Every change is checked on macOS and Linux, including the sandboxes; releases are reproducible, signed and come with SBOMs.

2. CI (ci.yml)

  • REL-01 Triggered on push to main and pull requests, except documentation-only changes. The runners’ Bazelisk runs the Bazel in .bazelversion; bazel-contrib/setup-bazel caches Bazelisk, the repository cache and a disk cache per OS, saved only from main (another branch’s would serve only it, and could evict main’s from GitHub’s 10 GB). release.yml restores main’s disk caches (ci-ubuntu-latest, ci-macos-latest) without saving, so a release builds again only what the version stamp changes; ARM Linux, which CI doesn’t build, has none. No other toolchain is installed: Bazel brings Go, Node and the tools.
  • REL-02 build job on ubuntu-latest and macos-latest, every step named: bazel test --config=race //... (vet and staticcheck run in every compile, MR-16; on Linux through tools/coverage.sh, which fails below the coverage floor, spec_030_release_readiness RR-43). Since 2026-10-24 macOS runs the tests without the race detector: the owner runs tools/coverage.sh --config=race on the Mac before every push, and Linux, where the Linux-only code runs, keeps it. On a push to main, when the merged pull request’s last passing run tested the same files (its tested-tree-<OS> artifact holds the tree’s hash; main hadn’t moved), the tests and the sandbox, gVisor and script-environment checks are skipped, the coverage report is that run’s, and the disk cache keeps its older entries; the packages, checksums and Linux checks still run. Since 2026-10-24: the packages’ tests (tagged packaging: //release:contents_test and //apps/electron/packaging’s) leave that run for a Packages step without the race detector, as the release builds them (on Linux every release archive, the Linux and Windows packages; on macOS the Mac app), so every platform’s programs build once, not again under the race detector’s configuration. The checks that read only the sources run on Linux only: tools/check_format.sh (gofmt, BUILD files current, license headers), bazel run //tools:check_deps (MR-02), the third-party notices, specs and code owners checks, the protos (REL-04), and govulncheck (fails only on a vulnerability the code reaches) on the released blitz and blitzd for Linux, macOS and Windows, linked unstripped from the Packages step’s compiles. A newer push to a pull request cancels its older run.
  • REL-03 Linux installs bubblewrap (since v0.7.0 only that: GTK, WebKitGTK and Xvfb went with the Wails app, and with them the WebKitGTK printing test) and a pinned gVisor (runsc, checksum-verified). The OS-sandbox enforcement test (TestOSSandboxEnforcement) and gVisor tests (TestGVisor*) must not be skipped — the job fails if their verbose output contains --- SKIP.
  • REL-04 Protos (Linux): lint is a test (blitzv1_proto_lint); bazel run //tools:buf -- format --exit-code -d; and buf breaking against the previous commit (full history fetched), unless the commit message declares Breaking-API: <why>.
  • REL-05 The desktop app and its page are built and tested by bazel test //... like everything else.
  • REL-06 reproducible job: an archive’s checksum from the Linux and macOS runners must be identical (MR-25). Until 2026-10-24 every archive (//release:archives), which had the macOS runner compile all five platforms; since then //release:blitz_darwin_arm64, whose programs both runners build anyway (Linux for the archives, macOS for the Mac app).
  • REL-07 Actions are pinned by commit SHA; Dependabot keeps them current.

3. Release (release.yml)

  • REL-10 Tagging v* runs the release on Ubuntu: bazel build --config=release //release:archives (stamped with the tag, MR-20).

  • REL-11 Binaries: blitz and blitzd, pure Go, for darwin/linux × amd64/arm64 and windows/amd64 (MR-21), built on one machine.

  • REL-12 Archives blitz_<version>_<os>_<arch>.tar.gz (.zip on Windows), each holding the folder blitz_<os>_<arch>/ with blitz, blitzd, blz (not on Windows), README, LICENSE and NOTICE (MR-22) (until v0.7.1 also blitz-tray.exe on Windows, spec_036_windows WIN-35); an SPDX SBOM per archive (syft, pinned); checksums.txt.

  • REL-13 The checksum file is signed keylessly with cosign via GitHub OIDC (id-token: write), bundle checksums.txt.sigstore.json: since v0.7.0 Sigstore’s standard bundle (--new-bundle-format), which pkg/selfupdate checks without cosign; cosign’s older bundle before. Users verify against this repository’s release workflow identity (^https://github.com/retail-cortex/blitz/\.github/workflows/release\.yml@refs/tags/v, issuer https://token.actions.githubusercontent.com), then sha256sum --ignore-missing -c checksums.txt.

  • REL-14 The release is a draft (gh release create --draft --verify-tag), with GitHub’s generated notes and the footer in .github/release-footer.md (verifying, the desktop packages, clearing macOS quarantine since the CLI binaries aren’t notarised).

  • REL-15 Installing and updating (PAR-MOD-06). release/install.sh is attached to each release (releases/latest/download/install.sh): on macOS and Linux (amd64, arm64) it downloads the archive for the machine, checksums.txt and its bundle for the latest release (BLITZ_VERSION another), verifies the bundle with cosign against REL-13’s identity when cosign is installed (a failure installs nothing; BLITZ_REQUIRE_SIGNATURE=1 makes cosign a must), checks the archive’s SHA-256, and puts blitz and blitzd in BLITZ_BIN (~/.local/bin) by renaming over them, with blz linked and macOS’s quarantine flag cleared, then says whether the folder is on PATH. //release:install_test runs it against a fake release.

  • REL-16 Homebrew: when a release is published (not a pre-release; or by hand for a tag), homebrew.yml downloads its checksums.txt, verifies it with cosign, writes Formula/blitz.rb with release/homebrew_formula.sh (the four macOS and Linux archives with their checksums; installs blitz, blitzd, blz and the license files; tests blitz --version) and pushes it to retail-cortex/homebrew-tap with the HOMEBREW_TAP_TOKEN secret, doing nothing without one. //release:homebrew_formula_test checks the formula.

  • REL-16a 2026-11-13 (the owner: the desktop app should install with brew). Homebrew cask: the same job downloads the release’s two macOS disk images with their bundles, verifies each with cosign against REL-13’s identity, takes their SHA-256 and writes Casks/blitz.rb with release/homebrew_cask.sh (arch arm: "arm64", intel: "x64"; auto_updates true, since the app updates itself; macOS 13 and later; uninstall quits dev.blitz.desktop and removes the dev.blitz.service and dev.blitz.tray login items, which run from inside Blitz.app; zap trashes the app’s ~/Library folders but keeps ~/.blitz, which the formula shares), pushed beside the formula. brew install --cask retail-cortex/tap/blitz installs the app; brew install retail-cortex/tap/blitz stays the command line. Homebrew 7 loads a third-party tap’s casks and formulae only once trusted (brew trust retail-cortex/tap), which the docs say. brew style passes on the generated cask. //release:homebrew_cask_test checks the cask.

  • REL-17 blitz update (--check, --version vX, --skip-signature): the latest release from GitHub’s API; a newer one (semantic versions; a pre-release is older than its release) is downloaded for the machine, checksums.txt’s signature checked against REL-13’s identity, since v0.7.0 in-process (pkg/selfupdate: sigstore-go, Sigstore’s trust root through its TUF repository, cached in ~/.blitz/sigstore; the transparency log entry, an observed time and the certificate’s SCTs required), so cosign isn’t needed; a release before v0.7.0 (cosign’s older bundle, ErrOldBundle) is still checked with cosign verify-blob (cosign not installed: a usage error unless --skip-signature, which still checks the checksum), the archive’s checksum checked, and blitz (the running executable, links resolved) and the blitzd beside it replaced by renaming new files over them (on Windows the old ones are moved aside). A copy under Homebrew’s Cellar or /usr is refused with how to update it; a development build needs --version. Afterwards it says to restart the service if it runs.

  • REL-17 2026-11-05 (scan N26-safety-enterprise#24, #25: pre-releases compared as text, so rc.10 was older than rc.9; the release check had no time limit, so a stalled connection hung blitz update --check). Pre-releases compare as SemVer says (dot by dot, numbers as numbers and before words, the shorter first). Checking and downloading give up on a server that doesn’t connect (15 s), finish TLS (15 s) or start its answer (30 s); a download’s body takes as long as it takes.

3a. Desktop release (release.yml desktop job)

  • REL-20 After the release job, a matrix on macos-latest, ubuntu-24.04 and ubuntu-24.04-arm builds the desktop package with --config=release and attaches it to the draft release.
  • REL-21 macOS: since v0.7.0 the Electron app (spec_038_electron EL-80): bazel build //apps/electron/packaging:Blitz_<arm64|x64>.app, then apps/electron/packaging/sign_macos.sh makes Blitz_<version>_macos_<arm64|x64>.dmg (one per Mac: Electron’s runtimes are separate) with the app and a link to /Applications, signing inside out (Electron’s libraries and helpers, its frameworks, its helper apps with entitlements.plist: JIT, unsigned executable memory, library validation off; the Go programs with their identifiers; the bundle). Before v0.7.0 the Wails app, universal: //apps/desktop/packaging:Blitz.app and its sign_macos.sh, Blitz_<version>_macos_universal.dmg. With a signing identity, blitz and blitzd and then the app are signed with the hardened runtime and a secure timestamp (no entitlements), the image is signed, notarised with notarytool (App Store Connect API key, waiting up to 30 min), stapled and validated, and spctl must accept it. Without one, the app is signed ad hoc and the job warns.
  • REL-22 Signing secrets: MACOS_CERTIFICATE (the Developer ID Application certificate and key as a base64 .p12), MACOS_CERTIFICATE_PASSWORD, DESKTOP_SIGN_IDENTITY (Developer ID Application: <name> (<team>)), NOTARY_KEY (the .p8 text), NOTARY_KEY_ID, NOTARY_ISSUER. The certificate goes into a throwaway keychain, deleted at the end of the job; without MACOS_CERTIFICATE nothing is signed.
  • REL-23 Linux: since v0.7.0 bazel build //apps/electron/packaging:deb (EL-80; the Wails app’s //apps/desktop/packaging:deb before), named blitz-desktop_<version>_<amd64|arm64>.deb: Electron in /usr/lib/blitz-desktop (its program as blitz-desktop, chrome-sandbox setuid root), the app in its resources/app with blitz, blitzd and blitz-tray; Depends: bubblewrap, Electron’s libraries (GTK 3, NSS, ALSA, GBM, libnotify, libsecret, XSS, XTST, xdg-utils, with Ubuntu 24.04’s t64 names). Also blitz-desktop_<version>_linux_<arch>.tar.gz, the same files to unpack anywhere, which updates itself. Before v0.7.0: Depends: bubblewrap, libgtk-3-0t64 | libgtk-3-0, libwebkit2gtk-4.1-0. The job installs the package with apt and fails if a library isn’t found, blitz or blitzd doesn’t run, or the link is wrong. The CLI isn’t put on PATH (the CLI archives do that). Maintainer: Retail Cortex <https://github.com/retail-cortex/blitz/issues>, and AppStream metainfo in /usr/share/metainfo/dev.blitz.desktop.metainfo.xml (linux/), whose <developer> (and <developer_name>, for AppStream before 1.0) is Retail Cortex: software centres such as GNOME Software and Ubuntu’s App Center take the author from it, and show “Unknown Author” without it.
  • REL-24 Each package is signed keylessly with cosign like the checksum file (REL-13), with its own bundle <file>.sigstore.json (Sigstore’s standard bundle since v0.7.0), verified against the same workflow identity. The packages aren’t in checksums.txt: the desktop app’s updater checks a package’s own bundle.
  • REL-25 Windows: since v0.7.0 the desktop app, Blitz_<version>_windows_x64.zip (//apps/electron/packaging:windows_zip, cross-built in the release job, signed with its own bundle): Blitz.exe (Electron’s program with Blitz’s icon and details, EL-06), the app in resources\app, the licenses. Not signed with Authenticode. The service installs as a login item only on macOS and Linux (launchd, systemd); on Windows blitz-tray.exe starts the service, starts at login itself (spec_036_windows); until v0.7.1 the CLI archive’s tray also served the page to a browser.
  • REL-26 Arch Linux: bazel build //apps/electron/packaging:pacman (since v0.7.0; the Wails app’s //apps/desktop/packaging:pacman before), a .pkg.tar.zst with the .deb’s programs, link, launcher and icons, and the notices in /usr/share/licenses/blitz-desktop (license = Apache-2.0). rules_pkg has no pacman rule: tools/pacman writes the .PKGINFO and .MTREE makepkg would, owns every entry by root and adds the parent directories, and bazel_lib’s zstd compresses it. depend: bubblewrap and Electron’s libraries (alsa-lib, gtk3, libnotify, libsecret, libxss, libxtst, mesa, nss, xdg-utils; before v0.7.0 the Wails app’s gtk3, webkit2gtk-4.1>=2.40). packager is Retail Cortex, and it carries the .deb’s AppStream metainfo. It’s named blitz-desktop-<pkgver>-1-<x86_64|aarch64>.pkg.tar.zst, where pkgver is the version without a pre-release’s - (0.4.0rc1, as Arch writes them, which vercmp orders before 0.4.0; with a separator it would come after) and with anything else pacman refuses made .. On x86_64 the job installs it with pacman -U in an archlinux container and fails if a dependency or library isn’t found, a program doesn’t run, the link is wrong, pacman -Qkk finds a file unlike its .MTREE, or removing it leaves /usr/lib/blitz-desktop. The aarch64 package (Arch Linux ARM) is built but not installed: there’s no arm64 archlinux image.

3b. The apt repository (release.yml apt job)

  • REL-30 2026-11-09 (the owner: the .deb showed no license, source or trust, and apt’s _apt notice). An apt repository at https://storage.googleapis.com/retail-cortex-blitz-apt (the retail-cortex project’s bucket, public to read), one suite, stable, component main, amd64 and arm64, for every Ubuntu and Debian release the .deb installs on: it isn’t built against one, and its dependencies name both libraries where a release renamed one (resolved on Ubuntu 24.04, 26.04 and 26.10). It holds the latest published release’s packages (and the previous one’s, for a machine whose indexes are older), Packages, AppStream data (DEP-11: Components-<arch>.yml and icons, composed from the package’s metainfo, so software centres show the license and the homepage), and Release signed as InRelease and Release.gpg (tools/apt_repo.sh).
  • REL-31 The packages key (Retail Cortex Blitz Packages, RSA 4096, until 2029-11-09; fingerprint FE74BCE7A38EC625A4E03E05417E7F2D4428C92C): the private key in the organization’s APT_SIGNING_KEY (and APT_SIGNING_PASSPHRASE), kept offline by the owner with its revocation certificate; the public key in apps/electron/packaging/linux/blitz-desktop.asc. Before it expires, the owner extends it (gpg --quick-set-expire) and updates the secret and the file: the package carries the key, so an update brings the new date.
  • REL-32 The .deb installs the repository: /etc/apt/sources.list.d/blitz-desktop.sources (a conffile: Enabled: no there stays through updates) naming /usr/share/keyrings/blitz-desktop.asc. The downloaded .deb installed once, apt upgrade updates it, and the app restarts the service with the new one (spec_038_electron EL-91b).
  • REL-33 The apt job runs when a release is published (the owner’s review of the draft done), not for a pre-release, or by hand for a published tag (gh workflow run release.yml --ref v<x.y.z> -f publish=true); the other jobs don’t run then. It downloads the release’s .debs, verifies them against their bundles (REL-24), builds the repository with the key the package carries, and uploads it with Workload Identity Federation: the repository’s variables APT_WIF_PROVIDER (pool github, provider blitz, which takes only release.yml in retail-cortex/blitz) and APT_SERVICE_ACCOUNT (blitz-apt-publisher, object admin on the bucket alone), so no GCP key is kept. The packages are uploaded first (cached a year), then the indexes (never cached), InRelease last; packages no index names are removed.
  • REL-34 2026-11-09 (the owner: Blitz should be found where Linux users look). A snap, blitz-desktop_<version>_<amd64|arm64>.snap: Bazel builds its tree (//apps/electron/packaging:snap_tree: the .deb’s programs in usr/lib/blitz-desktop, the notices, meta/snap.yaml from linux/snap/snap.yaml.in, the launcher and icon in meta/gui, the hooks), and the desktop job packs it with snap pack, installs it (--dangerous --classic), runs its programs and removes it. Classic confinement (base core24): the agent works on your projects with your own tools, which a confined snap can’t reach; it uses the system’s libraries, all of which a minimal Ubuntu desktop has (24.04 and 26.04; Electron doesn’t link libXss, which the .deb still names). Apps: blitz-desktop and blitz-desktop.blitz (the alias blitz needs the store’s approval). A snap can’t carry a setuid chrome-sandbox, so the install and post-refresh hooks (run as root, unconfined, as classic snaps’ are) write /etc/apparmor.d/blitz-desktop-snap, which gives the app’s program the user namespaces Chromium’s sandbox needs (userns, as Ubuntu’s own profiles for Chrome and VS Code do), where AppArmor 4 is (Ubuntu 24.04 and later); remove removes it. In a snap the app doesn’t update itself (selfupdate.FindInstall: “the Snap Store”), and the service’s login item and the blitz link name /snap/blitz-desktop/current/…, not a revision snapd removes after an update (loginitem.SnapCurrent); the service is restarted with the new revision when the window opens (spec_038_electron EL-91b).
  • REL-35 The snap job, beside the apt job and run as it is (REL-33), uploads a published release’s snaps, verified against their bundles, to the stable channel with snapcraft upload, logged in with the organization’s SNAPCRAFT_STORE_CREDENTIALS (snapcraft export-login --snaps=blitz-desktop --channels=stable,candidate). Without the secret it does nothing and says so. The store holds a classic snap for review until Canonical grants it classic confinement (requested on the Snapcraft forum by the owner, with the blitz alias).

4. Open items

  • The first release from retail-cortex/blitz still needs verifying against the new identity (MANUAL_VERIFICATION section 18). Releases made before the move (e.g. v0.1.0) and the python-final tag live in the former repository, rmcguinness/code_puppy, whose go-release.yml identity they verify against.
  • macOS notarisation of the CLI archives. The desktop image is notarised once the signing secrets (REL-22) are set; the first signed release needs checking (MANUAL_VERIFICATION §18).
  • The snap on an Ubuntu desktop (REL-34): the window opens with Chromium’s sandbox on (the hook’s profile), the tray, the service at login, and a refresh to a new revision; the store’s classic approval and the first upload (REL-35).
  • The first published release through the apt job (REL-33), and apt upgrade from it on Ubuntu 24.04, with App Center’s page for Blitz.
  • The Arch package (REL-26) on a real Arch desktop: the launcher, the icon and the tray, which the container smoke test can’t show.
  • Running opt-in real Python install tests (BLITZ_PYENV_TESTS=1) in CI.
  • Neither workflow has run on GitHub since the move to Bazel: the first push and the first tag need watching (MANUAL_VERIFICATION §18).