Build iOS App #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build iOS App | |
| on: | |
| # Called by release-please when a new version is released | |
| workflow_call: | |
| # Manual trigger for testing | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| env: | |
| BUNDLE_FROZEN: "true" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.4.8' | |
| bundler-cache: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-ios,aarch64-apple-ios-sim,x86_64-apple-ios | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri -> target | |
| cache-targets: true | |
| cache-on-failure: true | |
| - name: Set Homebrew prefix based on architecture | |
| id: brew-prefix | |
| run: | | |
| if [[ $(uname -m) == "arm64" ]]; then | |
| echo "prefix=/opt/homebrew" >> $GITHUB_OUTPUT | |
| else | |
| echo "prefix=/usr/local" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Get Homebrew formula versions | |
| id: brew-versions | |
| run: | | |
| echo "xcodegen=$(brew info --json=v2 xcodegen | jq -r '.formulae[0].versions.stable')" >> $GITHUB_OUTPUT | |
| echo "libimobiledevice=$(brew info --json=v2 libimobiledevice | jq -r '.formulae[0].versions.stable')" >> $GITHUB_OUTPUT | |
| - name: Cache Homebrew packages | |
| id: cache-homebrew | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ steps.brew-prefix.outputs.prefix }}/Cellar/xcodegen | |
| ${{ steps.brew-prefix.outputs.prefix }}/Cellar/libimobiledevice | |
| ${{ steps.brew-prefix.outputs.prefix }}/Cellar/libplist | |
| ${{ steps.brew-prefix.outputs.prefix }}/Cellar/libusbmuxd | |
| ${{ steps.brew-prefix.outputs.prefix }}/opt/xcodegen | |
| ${{ steps.brew-prefix.outputs.prefix }}/opt/libimobiledevice | |
| ${{ steps.brew-prefix.outputs.prefix }}/opt/libplist | |
| ${{ steps.brew-prefix.outputs.prefix }}/opt/libusbmuxd | |
| key: ${{ runner.os }}-${{ runner.arch }}-brew-${{ steps.brew-versions.outputs.xcodegen }}-${{ steps.brew-versions.outputs.libimobiledevice }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-brew- | |
| - name: Install Tauri iOS dependencies | |
| if: steps.cache-homebrew.outputs.cache-hit != 'true' | |
| run: | | |
| brew install xcodegen libimobiledevice | |
| # Ensure binaries are linked and in PATH for Tauri | |
| brew link --overwrite xcodegen libimobiledevice 2>/dev/null || true | |
| - name: Link cached Homebrew packages | |
| if: steps.cache-homebrew.outputs.cache-hit == 'true' | |
| run: brew link --overwrite xcodegen libimobiledevice 2>/dev/null || true | |
| - name: Cache Task checksums | |
| uses: actions/cache@v5 | |
| with: | |
| path: .task | |
| key: ${{ runner.os }}-task-${{ hashFiles('Taskfile.yml', 'taskfiles/**/*.yml', 'src-tauri/**/*.rs', 'src-tauri/Cargo.toml', 'src-tauri/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-task- | |
| - name: Install Task | |
| uses: go-task/setup-task@v1 | |
| - name: Build and upload to TestFlight | |
| run: task ios:testflight | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_ENDPOINT_URL: ${{ secrets.AWS_ENDPOINT_URL }} | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} | |
| APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} | |
| APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} |