Upload the iPhone build to TestFlight on release

This commit is contained in:
Ian Gulliver
2026-10-23 16:48:02 -07:00
parent 48e3457286
commit c651fe472d
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ What to expect:
## Releasing
A release is a deploy that is uploaded, and goes to every Mac through the app's updater. Make one only when the owner asks. It needs a `v<version>` tag on a commit of main, pushed by itself (`git push origin v<version>`, never moving or recreating a tag), and a clean checkout at that tag on the Mac byre runs on, where `mac/release.sh <notes>` checks the tag, runs `mac/package.sh`, uploads the image, its `.sha256` and `appcast.xml` to `dl.byre.run`, and creates the release on g.fc.run with copies of the image and its `.sha256`, and the Markdown file `<notes>` as its notes. `docs/operations.md`, "Releases", has the details.
A release is a deploy that is uploaded, and goes to every Mac through the app's updater. Make one only when the owner asks. It needs a `v<version>` tag on a commit of main, pushed by itself (`git push origin v<version>`, never moving or recreating a tag), and a clean checkout at that tag on the Mac byre runs on, where `mac/release.sh <notes>` checks the tag, runs `mac/package.sh`, builds the iPhone app with `mac/phone.sh` and uploads it to TestFlight, uploads the image, its `.sha256` and `appcast.xml` to `dl.byre.run`, and creates the release on g.fc.run with copies of the image and its `.sha256`, and the Markdown file `<notes>` as its notes. `docs/operations.md`, "Releases", has the details.
Before running it, write the notes yourself from the diffs since the previous tag (`git describe --tags --abbrev=0 v<version>^` names it; read `git diff <previous>..v<version>`, not just the commit subjects). Write the file outside the checkout, so the tree stays clean. It is a changelog for people who use byre, in this shape:
+1 -1
View File
@@ -40,7 +40,7 @@ Each preview gets its own port on byre's node rather than a path under byre's or
## Releases
A release is one notarized disk image, `byre-<version>.dmg`, holding `Byre.app` with the server, `byre-hands` and `byre-update` in `Contents/Helpers`. Images are served from `https://dl.byre.run/`; each release's notes are on `https://g.fc.run/ai/byre/releases`. `mac/package.sh` builds one, `mac/deploy.sh` builds one for installing on the owner's Macs and keeps a copy in `~/byre-deploy/` (see `AGENTS.md`, "Deploying"), and `mac/release.sh <notes>` publishes it from a clean checkout at a pushed `v<version>` tag. The build number (`CFBundleVersion`) of the Mac and iPhone apps is the Unix time each was built (`date +%s`), so a deploy's iPhone build is a few minutes after its Mac build; the apps send it in their `Byre-Build` header and the Status tab's client list shows it. A deployed build's `CFBundleVersion` is above every earlier release's, so the updater never offers to go back; a release of a commit already deployed is built later, so the updater offers it to the Macs running that deploy, which takes them to the release's version name.
A release is one notarized disk image, `byre-<version>.dmg`, holding `Byre.app` with the server, `byre-hands` and `byre-update` in `Contents/Helpers`. Images are served from `https://dl.byre.run/`; each release's notes are on `https://g.fc.run/ai/byre/releases`. `mac/package.sh` builds one, `mac/deploy.sh` builds one for installing on the owner's Macs and keeps a copy in `~/byre-deploy/` (see `AGENTS.md`, "Deploying"), and `mac/release.sh <notes>` publishes it from a clean checkout at a pushed `v<version>` tag. Both also upload the iPhone app to TestFlight, versioned by the newest tag the checkout has, so a deploy made before its release's tag exists uploads under the previous version, and the release uploads the build that carries the new one. The build number (`CFBundleVersion`) of the Mac and iPhone apps is the Unix time each was built (`date +%s`), so a deploy's iPhone build is a few minutes after its Mac build; the apps send it in their `Byre-Build` header and the Status tab's client list shows it. A deployed build's `CFBundleVersion` is above every earlier release's, so the updater never offers to go back; a release of a commit already deployed is built later, so the updater offers it to the Macs running that deploy, which takes them to the release's version name.
The appcast must never name an image that isn't available yet, and a published g.fc.run release must already have its attachments. If a failed release run leaves a draft on the releases page, delete it there before running again.
+3
View File
@@ -23,6 +23,9 @@ export CLOUDFLARE_API_TOKEN CLOUDFLARE_ACCOUNT_ID
notes=$(cat "$1")
"$mac/package.sh"
"$mac/phone.sh"
rm -rf "$mac/.build/phone/iphoneos/export"
xcodebuild -exportArchive -archivePath "$mac/.build/phone/iphoneos/Byre.xcarchive" -exportOptionsPlist "$mac/phone/export.plist" -exportPath "$mac/.build/phone/iphoneos/export" -allowProvisioningUpdates
out=$mac/.build/release/$version
dmg=byre-$version.dmg