Release
.github/workflows/testflight.yml builds, signs and uploads the iOS app to TestFlight. The Apple side is set up once, by hand.
One-time Apple setup
In the Apple Developer portal and App Store Connect, team RM3UT3MMSR:
- Register the App Group
group.dev.rbstp.collie. - Register each App ID below as an explicit App ID, with App Groups enabled,
group.dev.rbstp.collieassigned and the listed capabilities. - Create each profile below as an App Store Connect distribution profile with the team's Apple Distribution certificate. The names must match
Collie/project.ymlandCollie/ExportOptions.plist. - Create the App Store Connect app record for
dev.rbstp.collie, with an internal TestFlight group.
| App ID | Target | Other capabilities | Profile |
|---|---|---|---|
dev.rbstp.collie | the app | Push Notifications, App Attest | Collie App Store |
dev.rbstp.collie.push | ColliePush (notification service extension) | Push Notifications | Collie Push App Store |
dev.rbstp.collie.widgets | CollieWidgets (Live Activities) | none | Collie Widgets App Store |
dev.rbstp.collie.watchkitapp | CollieWatch | none | Collie Watch App Store |
dev.rbstp.collie.watchkitapp.widgets | the watch's usage complication | none | Collie Watch Widgets App Store |
- CollieWidgets needs no push capability: Live Activity pushes use the app's topic and the same APNs key.
- On the watch, the group is the watch's own container, and there is no keychain group.
- A profile is a snapshot of its App ID's capabilities: after any capability change, regenerate it (Edit, Save) and update its secret.
APNs key for direct APNs
A machine on the publisher relay needs no key. Give each machine its own key, so you can revoke a compromised machine's key alone. The key is not the App Store Connect API key and never goes into GitHub.
In Certificates, Identifiers & Profiles, Keys, add a key with Apple Push Notifications service (APNs) and environment Sandbox & Production, so one collied serves debug builds from just ios-run-device and TestFlight builds. Download the .p8 (offered once) and note the Key ID.
With no push mode configured, collied setup --direct-apns asks for the .p8 (already mode 0600) and the IDs, writes the section and imports the key. By hand:
# macOS: ~/Library/Application Support/collie/collied.toml
# Linux: ~/.local/share/collie/collied.toml ($XDG_DATA_HOME/collie/collied.toml when absolute)
[apns]
key_id = "<KEY_ID>"
team_id = "RM3UT3MMSR"
bundle_id = "dev.rbstp.collie"
just collied-install # signed on macOS; restarts a loaded agent or an active unit
chmod 0600 AuthKey_<KEY_ID>.p8
collied apns import AuthKey_<KEY_ID>.p8 # stores the key, reads it back, offers to delete the file
collied doctor # apns line (and codesign on macOS) must be ok
collied apns test # needs a paired phone
key defaults to "keychain" on macOS and "systemd-creds" on Linux.
- macOS: the login Keychain item trusts the program that created it, so only collied signed with your Developer ID Application identity reads it without a prompt. Import with the signed binary, and after every change to collied reinstall with
just collied-install, nevercargo install. - Linux: the key is a systemd user credential sealed with the host key, plus the TPM2 when one is usable, or a 0600 file where systemd-creds cannot encrypt (APNs key on Linux). The credential stops decrypting after an OS reinstall, a machine-id change, a uid or user name change, or a move to another machine: keep a copy of the
.p8offline to import again.
Menu bar app notarization (optional)
just mac-install signs the menu bar app with the Developer ID Application certificate and the hardened runtime. It has no entitlements, so it needs no App ID or provisioning profile, and runs unnotarized on the Mac that built it. To run it on another Mac without a Gatekeeper prompt, notarize it:
- Accept the latest Program License Agreement, or Apple refuses submissions.
- Store one notarytool credential in the login keychain, from an App Store Connect API team key with the Developer role (the TestFlight key works) or an Apple ID app-specific password (appleid.apple.com):
xcrun notarytool store-credentials collie --key AuthKey_<KEY_ID>.p8 --key-id <KEY_ID> --issuer <ISSUER_ID>xcrun notarytool store-credentials collie --apple-id <apple id> --team-id RM3UT3MMSR --password <app-specific password>
- Run
just mac-install, thenjust mac-notarize(orjust mac-notarize <profile>) to submit, wait, staple the app intarget/macand~/Applications, and check it withspctl. On a failure,xcrun notarytool log <submission id> --keychain-profile colliesays why.
Repository secrets
Set these repository secrets, encoding the base64 ones with base64 -i <file> | gh secret set <NAME>:
| Secret | Content |
|---|---|
APPLE_DIST_CERT_P12 | Apple Distribution certificate and key, .p12, base64 |
APPLE_DIST_CERT_PASSWORD | password of that .p12 |
APPLE_PROVISIONING_PROFILE, APPLE_PROVISIONING_PROFILE_PUSH, APPLE_PROVISIONING_PROFILE_WIDGETS, APPLE_PROVISIONING_PROFILE_WATCH, APPLE_PROVISIONING_PROFILE_WATCH_WIDGETS | the five profiles, in table order, .mobileprovision, base64 |
APPLE_KEY_P8 | App Store Connect API key (Developer role), .p8, base64 |
APPLE_KEY_ID | that key's ID |
APPLE_ISSUER_ID | App Store Connect issuer ID |
The certificate and profiles expire after a year; renew them and update their secrets.
Cutting a release
Keep published iOS, collied, CollieBar and CollieTray releases on the same version, tag and source commit, including UI-only changes.
- Merging a pull request into
masterships a build unless its title contains[skip-release]or it changes only.github/,docs/(the site included),Mac/,README.md,AGENTS.mdorCLAUDE.md. The site deploys separately (deploy-pages.md). - Version: the latest
v*tag with its minor number bumped when any commit since that tag, or the pull request title, is afeat, otherwise its patch number. Build number: the workflow run number. - A manual run (Actions, testflight, Run workflow, on
masteronly) ships the given version, for example1.0.0. - Before it archives, the workflow runs the unit tests (
CollieTestsand the GhosttyTerminal package) on the revision it ships, and keeps the result bundle of a failed run for 7 days. It does not run the UI suite:ciruns it on the pull request and on a push tomasterthat changes what the app builds from, so a UI regression shows on master'scirun and does not hold back a build. - After the upload, the workflow creates the tag
v<version>and starts the desktop release and the documentation screenshots refresh.
iOS release notes
Copy the release notes and tested-support disclosure from iOS release notes into the App Store version's What's New, or into Description for the first App Store version, which has no What's New (platform version information). Copy its test checklist into TestFlight's What to Test. Keep the disclosure in release metadata until broader testing is recorded.
The upload workflow publishes none of this, and a successful upload does not mean the build is processed and installable: check both in App Store Connect before distributing the build.
App icon and TestFlight
- The icon is a single 1024x1024 universal image,
Collie/Resources/Assets.xcassets/AppIcon.appiconset/AppIcon.png, from which Xcode derives every other size; the watch app has its own copy,Collie/CollieWatch/Assets.xcassets/AppIcon.appiconset/AppIcon.png. App Store validation rejects an asset-catalog icon withoutCFBundleIconName, soInfo.plistsetsCFBundleIconNametoAppIconandproject.ymlsetsASSETCATALOG_COMPILER_APPICON_NAME: AppIcon. - The iOS app embeds the watch app, so every iOS build, test and archive also builds for watchOS, and
ciandtestflightinstall the watchOS platform when the runner lacks it.
Debug symbols
Before each TestFlight upload, the workflow keeps an ios-symbols-<version>-<build>-<attempt> Actions artifact for 90 days: the archive's dSYM bundles and a build.txt with the source commit, app version and build, and symbol UUIDs, with no app archive, profile or signing credential. Download it from that run; keep a private copy if support may outlast it.
Before symbolicating, match the app UUID in a device report to build.txt or xcrun dwarfdump --uuid <app.dSYM>; never use symbols from another build, or from a rebuilt binary whose UUID differs. Keep device reports and captured logs private, out of public issues and release artifacts.
Export compliance
This is not legal advice; confirm with counsel before an App Store release.
Beyond Apple's own encryption, the app uses standard cryptography: WireGuard (Curve25519, ChaCha20-Poly1305) in libtailscale, TLS 1.3 (rustls with ring) to collied, and CryptoKit for notification payloads. It has no proprietary or non-standard cryptography, and the source is public.
- US (EAR): once generally available on the App Store, mass market under Note 3 to Category 5 Part 2, self-classified as 5D992.c under 15 CFR 740.17(b)(1). No CCATS. Since the 2021 rule (86 FR 16482), the annual self-classification report of 740.17(e)(3) covers components and certain executable software, not an end-item app like this one, so none is filed; this section is the classification record. A report, if ever filed, is due February 1 for the previous year, by email to
crypt-supp8@bis.doc.govandenc@nsa.gov. - Apple:
Info.plistsetsITSAppUsesNonExemptEncryptiontofalse. Apple's "exempt" means exempt from uploading documentation: standard algorithms not provided by the OS need a document only for the App Store in France (Apple's table). The key answers the encryption question for every build, so TestFlight uploads never stop at Missing Compliance. Never set it totruewithout the matchingITSEncryptionExportComplianceCode: builds then stop at Missing Compliance, and a code Apple did not issue can fail the upload. - Internal TestFlight (today): builds reach only the owner in Canada, and Apple applies US export law only to distribution outside the US or Canada. Nothing else to do.
Decision (owner, 2026-10-20): App Store availability is every country or region except France.
Before an App Store release:
- In App Store Connect, Pricing and Availability, App Availability, choose specific countries or regions and leave out France; All Countries or Regions includes it.
- If App Store Connect asks about encryption (App Information, App Encryption Documentation, or Manage next to a build), answer: uses encryption, yes; algorithms, "Standard encryption algorithms instead of, or in addition to, using or accessing the encryption within Apple's operating system"; available on the App Store in France, no. No document is needed.
- To ship in France instead: file a declaration with ANSSI (up to a month), fill in the App Description and availability, upload the declaration under App Encryption Documentation with France set to yes, and wait for Apple's approval. Then, in one commit, set
ITSAppUsesNonExemptEncryptiontotrueandITSEncryptionExportComplianceCodeto the key value Apple shows next to the approved document.
Leaving out France does not keep external TestFlight testers out of France. Apple documents no country or region setting for external testing, only tester criteria for devices and OS versions (Invite external testers, TestFlight overview); availability by country or region applies to the App Store (Manage availability). Apple's France requirement names only the App Store; until that is settled, invite no external testers located in France.
Adding a signed extension target
- Register its App ID, with the capabilities its entitlements use, and an App Store profile for it.
- Add its secret, for example
APPLE_PROVISIONING_PROFILE_<NAME>, to theenvof the "check for the signing secrets" and "import the signing certificate and profiles" steps; they check and install everyAPPLE_PROVISIONING_PROFILE*variable. - Map its bundle ID to the profile name under
provisioningProfilesinCollie/ExportOptions.plist, and setPROVISIONING_PROFILE_SPECIFIERin its Release settings inCollie/project.yml.
Public submission
Public submission preparation has the release gates and offline metadata and disclosure checks for #359, which records the submission results. App Review notes has the review notes, the real-device video and the submission checklist, which gates the public TestFlight link. The relay runbook has the operating procedures.
Documentation screenshots
After a successful upload, testflight dispatches .github/workflows/docs-screenshots.yml from master with the shipped commit, so the images in docs/site/src/images match the shipped app. A failed refresh never affects the build, the tag or the desktop release.
- capture, on
xcode-27with read-only contents and no secret, refuses a commit that is not onmaster, runsjust screenshot_watch=false ios-screenshotsand keeps the images as thescreenshotsartifact for 7 days. It restores caches but never saves them, so it cannot change whattestflightandcirestore. - propose, on
masteronly, in thedocs-screenshotsenvironment, copies the artifact's PNG files ontomaster, failing on any other file, and stops when nothing changed. Otherwise it force-pushes them to thedocs-screenshotsbranch and opens or reuses the pull request "Refresh documentation screenshots [skip-release]" with squash auto-merge. After the normal checks, the merge ships no build and deploys the site.
Pull requests, pushes and merges made with GITHUB_TOKEN start no workflow, and the repository does not let Actions create pull requests, so propose uses DOCS_SCREENSHOTS_TOKEN from the docs-screenshots environment: a fine-grained personal access token of the owner, limited to rbstp/collie, with Contents: Read and write and Pull requests: Read and write, an expiration date and no workflow permission. Keep the environment restricted to master: the owner's role bypasses the master ruleset, so a leaked token could push any file outside .github/workflows/ to master. Renew the token before it expires, and enter it at the prompt, never in a command argument or committed file:
gh secret set DOCS_SCREENSHOTS_TOKEN --repo rbstp/collie --env docs-screenshots
In this workflow only propose sees the token, and it never builds or runs the captured revision. Without the secret, propose fails with a message pointing here, after capture has kept the images.
Only the iPhone screenshots refresh, since the runner's watchOS simulator runtime loses its files minutes after it is mounted (#539). When the watch app changes, the owner refreshes watch-usage.png and watch-widget.png with a local just ios-screenshots and commits them.
To refresh without a release, run the workflow by hand (Actions, docs screenshots, Run workflow, on master), optionally with a master commit to capture instead of the head. Usage reset times and the watch's clock follow the capture time, so usage-light.png and usage-dark.png change on every run and every release opens a refresh pull request; a local run also changes the watch images.
Prices
Every Monday, .github/workflows/prices.yml moves litellm_commit in the justfile to LiteLLM's latest main commit and runs just prices with the jq release that wrote crates/collied/data/prices.json, downloaded and checked against its SHA-256, so an unchanged price keeps its formatting. jq only filters the fetched table; the job runs nothing from it. When prices.json changes, the job force-pushes the refresh-prices branch and opens or updates the pull request "Refresh LiteLLM prices [skip-release]". Merging it ships no build: the new prices go out with the next release. It never enables auto-merge: the diff is third-party data, so review the changed models and rates first.
The job shares the docs-screenshots environment and its DOCS_SCREENSHOTS_TOKEN (above), for the same reason: a pull request opened with GITHUB_TOKEN starts no workflow. Without the secret, it fails with a message pointing here. To refresh between Mondays, run the workflow by hand (Actions, prices, Run workflow, on master).
App Store screenshots
just ios-screenshots also writes the App Store set to target/ios/app-store, which Git ignores and the workflow does not keep: the capture before resizing and compression, as PNG without alpha, which App Store Connect requires:
- the twelve iPhone screenshots (Agents, Usage, New task, Chat, Terminal and an approval, light and dark) at 1320 x 2868, the iPhone 18 Pro Max simulator's native size and a portrait size of iPhone with Dynamic Island (large display);
watch-usage.pngandwatch-widget.pngat 416 x 496, the Apple Watch Series 12 (46mm) simulator's native size, accepted for Series 10, 11 and 12.
Check both sizes against Apple's screenshot specifications before submitting; that page says iPhone Duo screenshots become required in April 2027 for apps built with the iOS 27.1 SDK or later.
The default run needs an iPhone 18 Pro Max simulator paired with a watch simulator (xcrun simctl pair <watch> <phone>); screenshot_watch=false skips the watch. It deletes target/ios/app-store first, so run it before any screenshot_device run.
For version 0.1.8, App Store Connect first asked for an iPhone 6.5" Display set (1242 x 2688 or 1284 x 2778), then for iPhone with Dynamic Island (medium display) (1206 x 2622 or 1179 x 2556). just screenshot_device="<simulator>" ios-screenshots captures only the twelve iPhone screenshots, on that simulator, into target/ios/app-store/<width>x<height>: iPhone 18 Pro gives 1206 x 2622, an iPhone 14 Plus simulator (xcrun simctl create "iPhone 14 Plus" com.apple.CoreSimulator.SimDeviceType.iPhone-14-Plus) 1284 x 2778, and iPhone 11 Pro Max 1242 x 2688. The iOS 27.2 runtime cannot create an iPhone Xs Max or an iPhone Duo; the iPhone Duo set needs the iOS 27.1 runtime, a one-time 7.9 GB download:
xcodebuild -downloadPlatform iOS -buildVersion 27.1 -architectureVariant arm64
xcrun simctl create "iPhone Duo" com.apple.CoreSimulator.SimDeviceType.iPhone-Duo com.apple.CoreSimulator.SimRuntime.iOS-27-1
just screenshot_device="iPhone Duo" ios-screenshots
The set lands in target/ios/app-store/1398x2034, the cover display's native size and one of the two portrait sizes App Store Connect accepts for iPhone Duo. Xcode 27.2 cannot capture the inner display (2007 x 2853): the simulator boots folded, and neither Xcode nor simctl unfolds it.
Upload them by hand:
- On the commit being submitted, so the screenshots match the binary, run
just ios-screenshots, then ascreenshot_devicerun for each other size App Store Connect lists. - In App Store Connect, open the iOS version being prepared, then Previews and Screenshots. Under iPhone, for each listed size, add up to 10 screenshots from its folder in display order, for example the six of one appearance. Apple names the medium display as the required iPhone size and scales a larger set for smaller sizes; before submitting, check that App Store Connect shows the iPhone requirement as met.
- Under Apple Watch, add
watch-usage.pngandwatch-widget.png, with the same watch size in every localization, then save.
Desktop GitHub releases
After TestFlight creates the version tag, testflight dispatches .github/workflows/desktop-release.yml from master with that tag and source commit. Desktop release downloads covers the workflow and its secrets, assets, installation, Homebrew, AUR recipes and acceptance checks.
Third-party notices
scripts/notices.py builds the notices from the dependency graph: cargo-about 0.9.2 (checked against its pinned SHA-256) for the Rust crates, go-licenses v2.0.1 (verified through the Go checksum database) for libtailscale's Go modules, the Go and Rust standard library licenses, and the libghostty-vt license texts collected from the pinned sources: for the app by scripts/ghostty/build-xcframework.sh into the xcframework, for collied by scripts/ghostty/build-collied.sh into target/ghostty/collied/<target>/licenses, from the build for the host's own target, so notices.py collied runs after cargo build -p collied. A license that about.toml does not accept, or that cannot be identified, fails the build; accept a new license there and in deny.toml.
- App:
just ios-projectwritesCollie/Resources/Acknowledgements.json(not committed), shown in Acknowledgements in Settings and on the Welcome screen. Besides the app's linked code, it covers the JetBrains Mono and Symbols Nerd Font terminal fonts (license files committed beside the fonts), Octicons, and herdr's logo (Collie/Resources/herdr-LICENSE.txt, Apache-2.0, which also says the logo was resized). The watch app and the extensions are pure Swift and link no third-party code. - collied: the desktop release workflow writes
THIRD_PARTY_NOTICESbefore any signing secret is in the environment, since the script runs downloaded tools, andscripts/desktop/package.py --noticescopies it into both collied archives. Besides collied's dependencies for macOS and Linux, it covers libghostty-vt and what it links (simdutf, Highway, uucode, Zig's compiler-rt) and LiteLLM's price table. Both release jobs build libghostty-vt withbuild-collied.shbeforecargo build, with the Zig 0.17.1 they download and check againstscripts/ghostty/pins.env. Zig has no mirror, so a release needsziglang.orgreachable; the Ghostty tarballs fall back to this repository'sghostty-vt-<version>release. - CollieBar and CollieTray contain no third-party code and carry no notices; the CollieTray archive includes the project
LICENSE.
Protocol compatibility
Revision 26 is the negotiated baseline and the supported floor. Installations through revision 25 matched versions exactly and need one update on each side; pairing keys stay valid. Later releases keep the current and previous two implemented negotiated revisions; Negotiated protocol compatibility has the codec rules every wire change must follow. Publish every floor increase here and in the release notes, once fixtures cover both upgrade orders and the removed revision's refusal.