hex/.github/workflows/release-ios.yml
Ryan Vogel 8bc6e45a6b
Set up Hex Mobile internal TestFlight releases (#1997)
* iOS: move Hex for iPhone to Anomaly's Apple team

(cherry picked from commit 09061502ff)

* Cut Hex Mobile TestFlight betas with a dedicated release tag

Connect the Anomaly app record and pin the mobile package graph. Cut ios-beta prereleases from dev at the scheduled windows or on dispatch, skipping unchanged mobile inputs instead of creating desktop releases or allocating build numbers locally. Prepare the generated project for the Cloud archive after clone.

Verified actionlint, duplicate and desktop-only skips, strict SwiftPM resolution, and an unsigned Release device archive containing the app, keyboard, and widgets. First Xcode Cloud onboarding and signed distribution are still pending.

---------

Co-authored-by: Kit Langton <kit.langton@gmail.com>
2026-11-19 11:48:49 -05:00

50 lines
1.8 KiB
YAML

name: Release Hex Mobile
# An ios-beta-* tag is the Xcode Cloud start condition. Cloud owns signing,
# build numbers, and distribution to Hex Internal.
on:
workflow_dispatch:
schedule:
- cron: "0 0,17,18,23 * * *"
permissions:
contents: write
concurrency:
group: release-hex-mobile
cancel-in-progress: false
jobs:
release:
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check release window
id: window
run: |
hour=$(TZ=America/Chicago date +%H)
if [[ "$GITHUB_EVENT_NAME" == workflow_dispatch || "$hour" == 12 || "$hour" == 18 ]]; then
echo "cut=true" >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
if: steps.window.outputs.cut == 'true'
with:
fetch-depth: 0
persist-credentials: false
- name: Cut iOS prerelease
if: steps.window.outputs.cut == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
previous=$(git describe --tags --match 'ios-beta-*' --abbrev=0 HEAD 2>/dev/null || :)
if [[ -n "$previous" ]] && git diff --quiet "$previous" HEAD -- ios app/AppIcon.icon tests/fixtures/vocabulary/audio/term-hex-1.wav; then
echo "No mobile changes since $previous." >> "$GITHUB_STEP_SUMMARY"
exit 0
fi
sha=$(git rev-parse HEAD)
tag="ios-beta-${sha:0:12}"
gh release create "$tag" --repo "$GITHUB_REPOSITORY" --target "$sha" \
--title "Hex Mobile · ${sha:0:12}" --prerelease --latest=false \
--notes "Internal iOS beta from \`$sha\`. Xcode Cloud builds and distributes it to Hex Internal."
echo "Cut $tag at $sha." >> "$GITHUB_STEP_SUMMARY"