Skip to content

Each release has Hush for macOS, Windows and Linux, and make publish makes it - #285

Merged
pitis merged 7 commits into
mainfrom
feat/releases-for-everyone
Nov 29, 2026
Merged

pitis merged 7 commits into
mainfrom
feat/releases-for-everyone

Conversation

@pitis

@pitis pitis commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • make publish [version=0.2] (scripts/publish.sh, Every merge can publish a GitHub release with the app: make publish #215's script and its version rules, on the GPUI build): builds origin/main's Hush.app with make bundle in worktrees/publish (never installs it), zips it as Hush-<version>-macos-arm64.zip and creates the GitHub release v<version> on that commit, titled Hush <version>, with the commit's subject and a link to the README's Download section as notes. Versions: v0.1, then 0.1.1, 0.1.2, …; version=0.2 starts a line (it must be above every release); a commit already tagged v… on origin is skipped. One run at a time (lockf); local changes in worktrees/publish are refused. Signed with the owner's Apple Development identity when it's in the keychain, else ad-hoc with bundle.sh's warning.
  • .github/workflows/release.yml: on a release being published (or gh workflow run release.yml -f tag=v0.1 to redo one), builds hush-desktop for Windows x64 (windows-latest) and Linux x64 (ubuntu-24.04), checks each binary starts, and uploads Hush-<version>-windows-x64.zip (hush.exe) and Hush-<version>-linux-x64.tar.gz (hush/hush, hush/dev.pitis.hush.desktop, hush/dev.pitis.hush.png rendered from AppIcon.icon/Assets/girl.svg at 512 px) to it.
    • Windows build needs (from The desktop app builds and runs on Windows #155, now proven): protoc (Chocolatey), Git Bash (on the runner; RingRTC's WebRTC download), OPENSSL_DIR = an empty folder with lib and include, and RUSTFLAGS=-C target-feature=+crt-static: RingRTC's prebuilt WebRTC links the static C runtime (libcmt/libcpmt, its build.rs), as RingRTC's own Windows build does. The exe then needs no Visual C++ runtime.
    • Linux: the README's packages, and for the job only librsvg2-bin, desktop-file-utils, xvfb, xauth, mesa-vulkan-drivers. Not libpulse-dev: with it cubeb-sys links its PulseAudio backend, a Rust static library carrying its own std, and the link fails on duplicate alloc symbols (seen in the first test run). Calls' audio on Linux uses cubeb's ALSA backend, as in local Linux builds.
    • Each job packages first, then starts the unpacked zip's / tarball's app with a throwaway HUSH_DATA_DIR: it must still run after 20 s and have made its key file and both databases (presage.db, projection.db: the core opened its store). Only then it uploads.
    • Rust from core/rust-toolchain.toml (rustup toolchain install), cargo cached with Swatinem/rust-cache, saving only on runs from main: a run for a tag can restore main's caches but never another tag's, so a release run's own cache would never be used.
    • Hardening (from the security review): every action pinned to a full commit SHA with its version in a comment; top-level permissions: contents: read, contents: write only on the two jobs (both upload); GH_TOKEN only on the Upload steps; persist-credentials: false on checkout; the tag reaches scripts as $TAG, never as ${{ }} in a script.
  • make bundle builds with --locked (as the workflow does), so a release never re-resolves dependencies.
  • Release version in the app: HUSH_VERSION (set by make publish and the workflow) is the version About shows (option_env!, else Cargo's 0.1.0) and bundle.sh writes into Info.plist. Without it, every release's About would say 0.1.0.
  • Windows: no console window (#![cfg_attr(windows, windows_subsystem = "windows")], The desktop app builds and runs on Windows #155's comment). Effect on stderr, where the core logs off Apple platforms: launched from Explorer, the Start menu or the Run key (Open at login), the log goes nowhere (Rust discards writes to a missing handle). It still reaches a launcher that hands the process its handles, as PowerShell's Start-Process -RedirectStandardError does (what the workflow's start check uses and prints; the README says so). Others (cargo run, a cmd redirect) should too, not tried. The in-app Core Log is unaffected.
  • core/desktop/dev.pitis.hush.desktop: the launcher entry the app already expects (APP_ID, the unread count's application://dev.pitis.hush.desktop); checked by desktop-file-validate in the workflow.
  • Wording: README intro and CLAUDE.md say Hush is an unofficial client for anyone on macOS, Windows and Linux (no longer "personal use"); AGPL kept. README has a Download section (each system's file, install steps, Gatekeeper / SmartScreen / Secret Service notes). PRODUCT.md's users and the M1 spec's "personal build" line follow.
  • CLAUDE.md: the merge step runs make publish; worktrees/publish; a Releases rule; make publish in Commands; "no CI" notes the release workflow.

Why

Owner's decisions of 2026-11-29 (#277): Hush is for everyone; make publish on the owner's Mac makes the release with the macOS app, a free GitHub Actions workflow adds Windows and Linux.

Choices to know

  • Linux runs on ubuntu-24.04, not ubuntu-latest: ubuntu-latest is Ubuntu 26.04 now, whose glibc would shut out Ubuntu 24.04 LTS. Built on 24.04, the binary needs glibc 2.39 or later (Ubuntu 24.04, Debian 13, Fedora 40, newer); Debian 12 and Ubuntu 22.04 can't run it. The README says so.
  • macOS zip is arm64 only (the owner's Mac builds natively; GPUI's floor is macOS 12). Not notarized either way: other Macs need Open Anyway once (README).
  • Not done (not asked here): a Windows exe icon or installer, code signing on Windows, Linux arm64 (doesn't build, README), checksums.

How it was tested

  • Review: pr-review-toolkit:review-pr (code, error handling, comments); findings and fixes in the PR comment.
  • The workflow, for real, on this branch: GitHub runs release workflows from the tag's commit, so I published throwaway pre-releases (test-277-N) on this branch's commits; each ran the workflow, and each was deleted with its tag afterwards (no v… tag was made; make publish ignores other tags anyway).
    • Run 3 on this PR's final workflow: both jobs green. Windows: built in 13m38s, hush.exe still running after 20 s with its key file made, uploaded Hush-test-277-3-windows-x64.zip. Linux: built in 11m51s, hush still running after 20 s under xvfb (software Vulkan), quit on SIGTERM (timeout's 124), key file made; its log shows only the expected warnings of a headless runner (no notification server, tray host or NetworkManager). Uploaded Hush-test-277-3-linux-x64.tar.gz.
    • Downloaded that tarball: hush/hush (ELF x86-64, highest glibc symbol GLIBC_2.39), hush/dev.pitis.hush.desktop (passes desktop-file-validate in the job), hush/dev.pitis.hush.png (512×512, the girl icon, looked at).
    • Run 2: Windows green; Linux failed to link with libpulse-dev (above). Its Windows log, captured through Start-Process -RedirectStandardError, shows the stderr route works with windows_subsystem.
    • Run 4, with temporary screenshot steps (fd6f350, reverted in 757e5da): both green, and the screenshots show the real link screen on both runners, "Link Hush to your phone" with a provisioning QR code, so the window draws (Direct3D on Windows, software Vulkan under xvfb on Linux) and the core reached the server. The screenshot artifacts were deleted after looking (they held live provisioning codes).
    • Run 5, after the review: both jobs green on the final workflow. Each started the app unpacked from its own package (zip / tarball) and found the key and both databases; Windows built in 13m02s, Linux in 11m48s; both assets uploaded (Hush-test-277-5-windows-x64.zip 25 MB, Hush-test-277-5-linux-x64.tar.gz 34 MB). The Windows log again shows GPUI's RefCell already borrowed errors around the first frames (six lines; also in run 2, not in run 3); the app keeps running and run 4's screenshot shows it drawn.
  • make publish: scripts/publish.sh in a throwaway repo with a local bare origin, stub make (fakes core/target/bundle.noindex/Hush.app, logs HUSH_VERSION) and stub gh (checks the zip holds Hush.app/Contents/MacOS/hush, tags origin as GitHub does): 23 checks pass — v0.1 first (built with HUSH_VERSION=0.1, Hush-0.1-macos-arm64.zip, target = origin/main's sha); already released → skipped, gh not called; v0.1.1; after v0.1.10 → v0.1.11; version=0.2 → v0.2, then v0.2.1; version=0.2/0.1/0.5.1/abc refused; a test-… tag doesn't count; annotated tag → skipped; version= on a released commit says it wasn't used; version=0.5 → v0.5; worktrees/publish follows origin/main, the main checkout stays on main; local changes refused; a held lock refused; a removed worktree recreated, also one deleted with rm -rf (this case failed before the review fix). The same harness against Every merge can publish a GitHub release with the app: make publish #215's script fails (old app path, no HUSH_VERSION).
  • Real HUSH_VERSION=0.1 make bundle here (no certificate: ad-hoc, with the warning): Info.plist's CFBundleShortVersionString and CFBundleVersion are 0.1, arm64; ditto zip 23 MB; the unzipped app passes codesign --verify --deep --strict.
  • About shows the release's version: the --snapshot About screen built with HUSH_VERSION=0.1.7 read "Version 0.1.0 (core 0.1.0)" before the change and "Version 0.1.7 (core 0.1.0)" after (looked at both). Cargo rebuilds hush-desktop when HUSH_VERSION changes or goes (checked both ways).
  • Gate, on the head merged with main (dd6d0a7): make format (no changes); make check passes (fmt, both clippy runs, 364 + 546 tests); actionlint 1.7.12 with shellcheck: clean; shellcheck 0.11 on scripts/publish.sh and scripts/bundle.sh: clean.
  • Not run: a real make publish (it makes the public v0.1 release; that is for after the merge, from main).

Closes #277
Closes #122
Supersedes #215.

make publish builds origin/main's Hush.app in worktrees/publish and makes the
GitHub release with it (v0.1, then 0.1.1, ...); a workflow builds Windows and
Linux on that release, checks they start, and attaches them. The release's
version reaches the app's About and Info.plist through HUSH_VERSION. On
Windows the app opens no console window. The README says how to download and
install Hush on each system; it is for anyone now.
…bases

The workflow packages first, then starts the zip's and the tarball's app and
requires the key and both databases. make publish recreates a worktree deleted
by hand, keeps the build from holding its lock, and builds with the locked
dependencies. The README gives the Windows and Linux build needs the workflow
proved, a launcher entry that works without ~/.local/bin on the PATH, and how
to get the Windows log; the launcher comments name the shipped desktop file.
@pitis

pitis commented Nov 29, 2026

Copy link
Copy Markdown
Owner Author

Review (code, error handling, comments) and fixes

The security review's points (asked before the review) are in 7e59801: actions pinned to full SHAs, contents: read at the top and write only on the two uploading jobs, GH_TOKEN only on the Upload steps, persist-credentials: false.

Fixed (41d1e4f, proven by run 5):

  1. The start checks passed while the core couldn't open its data. The key file is written before the store opens, so a failed Client::open (the app's "couldn't open the data" screen) was green. Both checks now also need presage.db and projection.db in the data folder.
  2. The start checks ran target/release, not what users download. Each job now packages first, then unpacks the zip / tarball to a fresh folder and starts that copy (a DLL beside the exe in target/release would have passed before).
  3. "quits on SIGTERM" wasn't checked (timeout returns 124 whatever the app does after TERM). The comment now says only what's checked: still running at 20 s.
  4. Windows ExitCode could print empty after the process is gone: the step holds the process handle.
  5. README's Windows paragraph was stale ("untested") and lacked RUSTFLAGS=-C target-feature=+crt-static; the Linux list didn't say libpulse-dev breaks the link. Both rewritten from what the workflow proved, with how to get the Windows log (Start-Process … -RedirectStandardError), and a line on releases.
  6. Launcher comments in notifications.rs said no .desktop file ships. They name the shipped one now.
  7. A worktrees/publish deleted with rm -rf was never recreated (git worktree add fails on the stale registration; reproduced). publish.sh runs git worktree prune first; a harness case failed before and passes now.
  8. The build inherited the lock's descriptor: a helper outliving the build would hold the lock. make … bundle 9>&-.
  9. make bundle didn't build with --locked: a drifted lock would be re-resolved (a macOS app on other dependencies than Windows/Linux) and leave worktrees/publish dirty, refusing the next publish. bundle.sh builds with --locked.
  10. README install details: the Linux launcher entry gets an absolute Exec (works without ~/.local/bin on the session's PATH); an update on Windows goes in the same folder (Open at login keeps the exe's path); macOS 12's System Preferences name. CLAUDE.md: "each merge is followed by a public release", worktrees/publish takes disk, "don't edit there".

Declined:

For the owner (not changed):

  • On Windows the release has no log at all unless started with a redirect (windows_subsystem, as The desktop app builds and runs on Windows #155 asked): every warn!/error! and a panic's message go nowhere, and a failure before the window opens (e.g. no usable Direct3D adapter) shows nothing. A log file in the data folder would fix it; your call.
  • An Apple Development signature carries your name (the certificate's subject), readable with codesign -dv from every public macOS zip once the certificate is on this Mac. Today's builds are ad-hoc (no name).
  • Disk: worktrees/publish keeps a release build between publishes (about 3 GB measured here for core/target/release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Each release has Hush for macOS, Windows and Linux Every merge publishes a GitHub release with the app

1 participant