Releasing
A free release is a version tag, CLI archives, a pinned CLI installer, public tray bundles, workspace SBOMs, generated Homebrew definitions, and SHA256SUMS. The tag workflow uploads them and publishes the GitHub release automatically only after required unprivileged checks (including dependency policy/MSRV), minimum-runtime fixtures, website, artifacts, and SBOM gates pass. No commercial service or updater participates.
Before tagging
- [ ]
python3 tests/run.py ci - [ ]
python3 tests/run.py site - [ ]
python3 scripts/release.py verify-version - [ ] Dispatch the full workflow on a non-tag branch at the frozen candidate SHA and retain the required job results and candidate artifact hashes
- [ ] Confirm the version tag is unused locally and on the release remote;
v0.1.0-alphais an older test tag and must not be moved - [ ] Enable GitHub private vulnerability reporting for the public repository
- [ ] Retain required Debian 13 amd64, macOS 15 arm64, macOS 26 arm64, and Windows 10 22H2 amd64 VM signoffs and browser reports; both Macs must validate the same Mac 15-built ARM artifact; physical-hardware-specific checks are deferred
- [ ]
scripts/release-sbom.shand attach the SBOMs to the release - [ ] Finalize the dated changelog entry; synchronize all Cargo package versions; packaging inherits the GUI package version, and refresh
Cargo.lockwhen dependencies change - [ ] Run
testd doctor --jsonagainst a clean VM and keep the output - [ ] Verify the documented fresh-install path reaches a trusted HTTPS name, including Linux port privileges
Build
Linux and macOS CLI:
cargo build --release --bin testdLinux x86_64 releases provide both GNU libc and static musl CLI archives. Build the latter with the Rust target and musl-tools installed:
rustup target add x86_64-unknown-linux-musl
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc CC_x86_64_unknown_linux_musl=musl-gcc \
cargo build --release --bin testd --locked --target x86_64-unknown-linux-musl
python3 scripts/release.py package --version 0.1.0-alpha.1 --target x86_64-unknown-linux-musl \
--build-dir target/x86_64-unknown-linux-musl/release --output dist --cli-onlyCI verifies that the musl executable has no dynamic loader or shared-library dependencies and runs its version/help commands. Linux desktop packages use the GNU target. The CLI installer detects GNU libc and otherwise selects musl; TESTD_LIBC=gnu or TESTD_LIBC=musl overrides that selection.
Windows CLI and tray (PowerShell):
$env:CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_RUSTFLAGS = '-C target-feature=+crt-static'
cargo build --release --bin testd --locked --target x86_64-pc-windows-msvc
cargo build --release -p testd-gui --locked --target x86_64-pc-windows-msvc
cargo packager --release --packages testd-gui --target x86_64-pc-windows-msvc --formats nsis `
--binaries-dir target/x86_64-pc-windows-msvc/release `
--out-dir target/x86_64-pc-windows-msvc/release/bundleWindows release executables link the MSVC runtime statically. The CLI ZIP requires no separately installed Visual C++ redistributable. Keep --target explicit for Windows release builds.
Linux and macOS tray:
cargo build --release -p testd-gui --locked
cargo packager --release --packages testd-gui --formats default \
--out-dir "$PWD/target/release/bundle"Use the explicit release formats from the CI matrix, and a fresh output directory for each candidate. Package files are placed directly in target/release/bundle/; scripts/release.py stages their stable public names without collecting nested tool executables.
Artifacts: CLI .tar.gz (Linux/macOS) or .zip (Windows), .dmg containing .app (macOS), .exe (Windows NSIS), .AppImage/.deb (GNU Linux). CI requires macOS arm64, GNU and musl Linux x64 CLI archives, GNU Linux desktop packages, and Windows x64 builds; Intel macOS is best effort. Build one ARM artifact on macOS 15 for separate native validation on 15 and 26, not competing ARM bundles from different builders.
AppImage bundles the linked GTK libraries and preserves ordinary GTK backend selection, including an explicit GDK_BACKEND. Its startup hook saves the host environment for browser and application launches before the bundled runtime changes it. Validate the actual desktop/tray host, host-browser handoff and a normal quick launch without XWayland before claiming support; packaging alone is not native desktop evidence.
Windows ships only NSIS, configured in crates/testd-gui/Cargo.toml to install per user into %LOCALAPPDATA%\Testd without installer elevation. Resolver and trust changes retain their separate native authorization prompts. No MSI or machine-wide deployment is claimed. Preserve the actual installer/shortcut/URL-handler identity when validating upgrades; a matching visible product name alone is not evidence.
Windows NSIS uses the repository template in packaging/windows/installer.nsi, derived from cargo-packager 0.11.8. Its interactive uninstaller offers ownership-checked NRPT/root cleanup before deleting app files, with profile purge as a separate unchecked choice. It invokes the installed GUI binary's private cleanup entry point, which shares the CLI implementation without starting the daemon. Failure or UAC cancellation aborts app removal; profile purge only follows successful system cleanup. Runtime comparisons guard protocol-handler and login-entry removal. Upgrades pass /P /UPDATE; /P compatibility callers also retain system integration, profile, and login state. Standalone /S retains integration and profile without invoking cleanup. A running tray blocks removal with exit 2; quit it before upgrading.
On Linux and macOS, run testd uninstall before removing the app; ownership-checked cleanup refuses changed or unowned integration. Add --purge only to delete local configuration after system cleanup succeeds. macOS cleanup requires the logged-in desktop session and native authorization. Windows CLI cleanup and the graphical uninstaller request native administrator authorization through UAC. Validate actual NSIS generation/compilation, interactive cancellation and retry, changed/unowned NRPT and root state, handler replacement, optional purge, and upgrade/silent paths on a backed-up disposable Windows host before claiming native acceptance.
Sign
The first release is an unsigned alpha. Do not purchase signing certificates or Apple Developer Program membership for this alpha.
- macOS: Optional free ad-hoc sealing only when useful for bundle resource integrity; no Developer ID, notarization, or Gatekeeper approval claim
- Windows: Remains unsigned; no Authenticode or SmartScreen reputation claim
- Linux: Checksums and workspace SBOMs; no additional signing infrastructure
Validate any ad-hoc seal on the final app before producing its DMG, then generate Homebrew definitions and checksums from those final bytes. Bundle sealing and package creation do not replace native installation approval. Keep the privacy manifest from packaging/macos/PrivacyInfo.xcprivacy.
Signing and notarization defines the optional credentialed macOS distribution mode outside this unsigned alpha. Homebrew and Browser validation cover their separate checks.
The desktop app and host daemon optionally check for newer releases at startup and daily. Users can disable checks persistently in the dashboard. Releases are installed by the user: the archive, brew upgrade, or the system package manager. No running executable is replaced automatically.
A Linux container can build/test the CLI and native tray and run cargo packager, but cannot produce notarized or Authenticode-signed artifacts.
Publish
- [ ] Tag
vX.Y.Zand push the tag after the pre-tag checks - [ ] Let CI build CLI archives and tray bundles, generate the pinned installer, SBOMs, Homebrew definitions and checksums, upload all assets, and publish the GitHub release automatically
- [ ] Download the published assets and confirm they match the validated candidate
- [ ] Copy the generated
testd.rbandtestd-gui.rbinto the Homebrew tap, then audit and install them locally - [ ] Confirm the published release includes the changelog entry and retain the pre-tag validation results
- [ ] After the release assets are public, publish the site with the matching root
Cargo.tomlpackage version
The public workflow defaults to unsigned distribution. Developer ID signing requires the explicit macOS mode and provisioned credentials below. A tag-push run creates a draft only if the release does not already exist, uploads all assets, then publishes it. Failed uploads leave a new release as a draft. Prerelease tags retain their prerelease status. Manual workflow runs build candidate artifacts without publishing. A rerun can add missing assets to an existing release, including a public one, and publishes an existing draft after a successful upload, but does not replace existing assets. Do not rerun against a public release unless adding assets is intended. Back up any asset before explicitly replacing it, and do not move an existing release tag to different source.
CLI installer
Each release attaches an install.sh whose default is that release's version. TESTD_VERSION overrides the default; an unset or empty value uses the pin. The installer downloads exact-version assets and verifies their checksums without a release-discovery request or GitHub token. The generated installer is included in SHA256SUMS, and release notes link to that asset.
The root install.sh defaults to latest, resolved through GitHub's releases/latest redirect before downloading exact-version assets. GitHub's latest release excludes prereleases; use an explicit TESTD_VERSION or a generated installer for those. No GitHub token is required or sent.
The product site reads the root Cargo.toml package version for its version label, download links, and /update.json. Vite replaces the latest default with that version in the served and built /install.sh, leaving the source unchanged. Release installer generation also leaves the source unchanged.
Deploy the site through the normal Pages Git integration after the matching release assets are public. Publishing the site advertises the Cargo version to installed hosts with update checks enabled; do not deploy a draft or unpublished version. Existing release assets and tags retain their original installer bytes.
Rollback
- GitHub: mark the broken version as withdrawn and publish a fixed version. Keep the previous good version and its checksums available. Existing installs keep working until the user chooses to replace them.
- Installer and website: rebuild and deploy the site from the previous published release's Cargo version
- Homebrew: revert the formula commit and
brew update. - macOS and Windows bundles are versioned per release, so a broken version can be withdrawn without affecting the previous one.
Homebrew
The formula ships the CLI and daemon; the cask ships the tray app.
Tap layout
Homebrew wants a repository named homebrew-<tap>. For brew tap stelmost/testd:
homebrew-testd/
Formula/testd.rb
Casks/testd-gui.rbpackaging/homebrew/*.rb.in are the source templates. The release generator fills a version and real source/DMG digests and attaches installable .rb definitions to the public release. The cask requires the Apple Silicon DMG and includes Intel only when its final asset exists; an arm-only cask explicitly requires arm64.
Local test before publishing
Run installation/audit checks only with owner authorization on separately restored, backed-up macOS 15 and 26 arm64 VMs using the same Mac 15-built ARM artifact. Retain separate results for each OS. Definition generation is not installation or signing approval.
# Definitions downloaded from the release (or generated locally from its final assets)
brew install --formula ./dist/testd.rb
brew install --cask ./dist/testd-gui.rb
brew test testd
brew audit --strict --online ./dist/testd.rb
brew uninstall --formula testd
brew uninstall --cask testd-guiVerify actual installation and Gatekeeper behavior on an authorized clean Mac. An unsigned or unnotarized app may require a user override; successful ad-hoc resource sealing is not Gatekeeper approval or a trusted signed-install experience.
Digests
After the version tag exists and the required final Apple Silicon DMG is in dist/ (include the optional Intel DMG only when available):
python3 scripts/release.py homebrew --version 0.1.0 --artifacts dist --output dist
python3 scripts/release.py checksums distThe source archive is fetched once and cached as dist/testd-0.1.0-source.tar.gz. The generator hashes that archive, the required Apple Silicon DMG, and any supplied Intel DMG; missing arm assets or invalid supplied assets fail rather than receiving placeholder checksums. It refuses to overwrite existing definitions or checksums and retains failed downloads as .partial. These digests detect changed bytes, not signing or native installation provenance. Use a new staging directory after signing or changing assets; retain the previous bytes.
Formula notes
- The formula builds from the source tarball with
cargo installand declaresdepends_on "rust" => :build. service dorunstestd hostas a user agent withkeep_alive true.brew services start testdis the supported path; the tray app is the alternative.- The formula's
test dorunstestd --helpandtestd doctor --json.doctorexits non-zero without a config, so the test tolerates that exit code.
Cask notes
depends_on macos: ">= :ventura".app "Testd.app".zap trash: "~/.config/testd"only after the root and the DNS route are removed;testd uninstalldoes both. Document that order in the release notes, not as a cask stanza that silently deletes state.
Bumping a release
- Synchronize package and bundle versions and finalize the changelog entry
- Tag the release and generate definitions from its final source archive and DMGs
- Run
brew audit --strict --online,brew test testd, and fresh formula/cask installs - Publish the matching definitions to the tap
Signing and notarization
The first release is an unsigned alpha: Windows stays unsigned, and Linux uses checksums/SBOMs without new signing infrastructure. Free macOS ad-hoc resource sealing may be used only for bundle integrity; it is not Developer ID signing, notarization, or Gatekeeper approval. No paid certificate or Apple Developer Program purchase is required or authorized for this alpha.
The optional macOS pipeline and Windows Authenticode reference below apply to separately approved trusted-signed delivery outside this alpha. They are not alpha prerequisites and do not authorize purchases. Source publication and CLI source builds do not require these credentials.
macOS
Distribution modes
release.yml uses the existing macOS build matrix and packaging path for both modes. unsigned retains cargo-packager's ad-hoc app seal, requires no Apple credentials, and makes no Gatekeeper approval claim. developer-id builds only the initial app with cargo-packager, then runs scripts/macos_release.py to produce and verify the signed DMG. Windows and Linux packaging retain their existing formats and signing policy. The separate macOS CLI archive is not Developer ID signed by this pipeline.
Manual workflow dispatch has a macos_distribution choice, defaulting to unsigned. Selecting developer-id authorizes that workflow run to contact Apple's timestamp and notarization services; it builds candidates without publishing. Tag runs default to unsigned; an owner must explicitly configure repository variable TESTD_MACOS_DISTRIBUTION=developer-id before a separately authorized signed release. Keep the mode fixed through candidate validation and tag publication. Missing credentials or failed signing/notarization abort signed packaging; there is no unsigned fallback.
Provisioning
The account owner must provision an active Apple Developer Program team, a valid Developer ID Application certificate with its private key, and notarization authorization. A development certificate, an installer certificate, and testd's local TLS root are not substitutes. Native Xcode tools must provide codesign, security, ditto, hdiutil, xcrun notarytool, xcrun stapler, and spctl.
Configure these references on the trusted release repository. Certificate/private-key and API-key contents belong only in the secret store, never in source, workflow inputs, artifacts, reports, or shell tracing:
| Reference | Storage | Required material |
|---|---|---|
TESTD_MACOS_SIGNING_IDENTITY | Repository variable | Exact 40-digit SHA-1 certificate fingerprint selecting the Developer ID Application identity |
TESTD_MACOS_TEAM_ID | Repository variable | Expected 10-character Apple Team ID |
TESTD_MACOS_CERTIFICATE_P12_BASE64 | Actions secret | Single-line base64 of the exported Developer ID Application certificate and private key in PKCS#12 format |
TESTD_MACOS_CERTIFICATE_PASSWORD | Actions secret | Nonempty password protecting that PKCS#12 export |
TESTD_MACOS_NOTARY_KEY_BASE64 | Actions secret | Single-line base64 of the App Store Connect team API private key (.p8) |
TESTD_MACOS_NOTARY_KEY_ID | Actions secret | API key ID authorized for notarization |
TESTD_MACOS_NOTARY_ISSUER_ID | Actions secret | Issuer UUID for that team API key |
The workflow exposes secrets only to the selected macOS signing step. Use trusted branches/tags and restrict who can dispatch workflows, create release tags, or change signing variables/secrets. CI imports the certificate into an isolated temporary keychain, writes credential files with mode 0600, and removes the temporary credentials on exit. It deletes its temporary keychain without replacing the default keychain or existing search-list entries. Native subprocesses do not inherit these credential environment variables, and native argv/output are withheld from errors because security receives import passwords as arguments. Use a dedicated release runner/account; do not enable process or shell tracing.
For local signing, an owner can instead provision an unlocked keychain containing the Developer ID identity and a notarytool Keychain profile in that same keychain. Supply their references with --keychain and --notary-profile; no private material is accepted as a command-line option. CI uses the team API key route above. Provisioning belongs to the account owner and remains separate from source builds and unsigned releases.
Build, sign and notarize
The app is not sandboxed, embeds no webview, and uses no JIT; it requires no added entitlements. Runtime system changes still use the existing authorization helpers. Package metadata is in crates/testd-gui/Cargo.toml; do not assume the former Tauri signing environment variable configures cargo-packager.
Use a clean worktree and fresh output paths. In a worktree, set CARGO_TARGET_DIR to the main checkout's target/. The local example uses existing public identity references and an owner-provisioned keychain/profile:
cargo build --release -p testd-gui --locked --target aarch64-apple-darwin
cargo packager --release --packages testd-gui --target aarch64-apple-darwin --formats app \
--binaries-dir "$CARGO_TARGET_DIR/aarch64-apple-darwin/release" \
--out-dir "$CARGO_TARGET_DIR/aarch64-apple-darwin/release/bundle"
python3 scripts/macos_release.py sign --version 0.1.0-alpha.5 \
--app "$CARGO_TARGET_DIR/aarch64-apple-darwin/release/bundle/Testd.app" \
--dmg "$CARGO_TARGET_DIR/aarch64-apple-darwin/release/bundle/Testd-signed.dmg" \
--work-dir "$CARGO_TARGET_DIR/aarch64-apple-darwin/release/macos-signing" \
--record dist/aarch64-apple-darwin.macos-signing.json \
--keychain "$TESTD_MACOS_KEYCHAIN" --notary-profile testd-notaryThe helper preserves the original app and refuses existing output, record, or working paths. It signs nested Mach-O code before enclosing bundles with hardened runtime and secure timestamps, then submits a ZIP of the app. Only an Accepted result with a submission UUID allows app stapling and verification. It creates a DMG containing that stapled app and the Applications link, signs the DMG, submits it separately, and staples/verifies its ticket. This gives both the downloadable image and the copied app their own tickets. Preserve failed staging paths for diagnosis and use fresh paths for another attempt; back up artifacts before explicitly replacing them.
Successful signing writes a public <target>.macos-signing.json containing the expected Team ID, bundle/version, final DMG SHA-256, and both accepted submission IDs. Credentials and Keychain profile references are excluded. The workflow rechecks the renamed DMG in dist/ against that record, mounts it read-only, and verifies the contained app before upload. Homebrew definitions and SHA256SUMS are generated from these final bytes.
Verify the distributed artifact
python3 scripts/macos_release.py verify --version 0.1.0-alpha.5 \
--team-id "$TESTD_MACOS_TEAM_ID" --dmg dist/Testd_0.1.0-alpha.5_aarch64.dmg \
--record dist/aarch64-apple-darwin.macos-signing.jsonVerification requires the expected Team ID and Developer ID Application authority, secure timestamps, app/nested-code hardened runtime, valid app/DMG signatures and stapled tickets, matching bundle version/privacy manifest, and Gatekeeper source=Notarized Developer ID for both image and mounted app. verify does not submit artifacts or access signing credentials; native trust assessment may contact Apple.
Retain separate native signoffs on clean, backed-up macOS 15 and 26 arm64 VMs using the same macOS 15-built ARM artifact. Download through Safari with quarantine intact, mount normally, drag the app to Applications in Finder, and launch it without an Open Anyway override. Record actual prompts and repeat launch without network access to exercise the stapled app ticket. Offline fixtures and hosted tool checks do not establish this user flow. The prior alpha E2E used overrides and a ditto copy, so it is not signed-delivery or Finder-copy acceptance evidence.
Common failures
| Symptom | Cause |
|---|---|
Invalid with "The signature of the binary is invalid" | A nested binary was signed after the bundle, or not at all. Re-sign inside out. |
Invalid with "hardened runtime is not enabled" | Missing --options runtime. |
Invalid with "The executable does not have the hardened runtime enabled" on a dependency | A sidecar or dylib shipped unsigned. |
spctl rejects but notarization passed | Inspect the expected Team ID and both tickets on the actual distributed image and mounted app. |
Submission timed out or remains In Progress | Retain staging and the submission status; a timeout is not acceptance. Diagnose before authorizing another submission. |
Windows
- Sign the NSIS installer and the binaries with an Authenticode certificate (
signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256). - Submit the installer to SmartScreen once per certificate; fresh certificates start without reputation and gather it per download.
- This repository does not ship an updater; see Releasing.
What not to sign
The root certificate and its private key are local data, not artifacts. They never enter the release pipeline.