|
| 1 | +name: iOS Personal Build |
| 2 | + |
| 3 | +# Builds an unsigned Release iPhone app with the Personal Team settings, so a |
| 4 | +# free Apple ID can sign and sideload it (apps/mobile/README.md). Fork-only: |
| 5 | +# upstream ships through EAS instead. |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - ios/personal-build |
| 10 | + workflow_dispatch: |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
| 15 | +env: |
| 16 | + NODE_OPTIONS: --max-old-space-size=8192 |
| 17 | + APP_VARIANT: production |
| 18 | + EXPO_NO_GIT_STATUS: "1" |
| 19 | + T3CODE_IOS_PERSONAL_TEAM: "1" |
| 20 | + # A free Apple ID registers this ID on first sign; keep it stable so each |
| 21 | + # weekly re-sign reuses the same App ID instead of spending a new one. |
| 22 | + T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID: io.github.notcompromised.t3code |
| 23 | + |
| 24 | +jobs: |
| 25 | + ios: |
| 26 | + name: Unsigned iPhone app |
| 27 | + runs-on: macos-26 |
| 28 | + timeout-minutes: 120 |
| 29 | + steps: |
| 30 | + - name: Checkout |
| 31 | + uses: actions/checkout@v6 |
| 32 | + with: |
| 33 | + sparse-checkout: | |
| 34 | + /* |
| 35 | + !/.repos/ |
| 36 | + sparse-checkout-cone-mode: false |
| 37 | + |
| 38 | + - name: Setup Vite+ |
| 39 | + uses: voidzero-dev/setup-vp@v1 |
| 40 | + with: |
| 41 | + node-version-file: package.json |
| 42 | + cache: true |
| 43 | + run-install: | |
| 44 | + args: |
| 45 | + - --filter=@t3tools/mobile... |
| 46 | + - --filter=@t3tools/scripts... |
| 47 | +
|
| 48 | + - name: Show toolchain |
| 49 | + run: | |
| 50 | + xcodebuild -version |
| 51 | + node --version |
| 52 | + pod --version |
| 53 | +
|
| 54 | + - name: Generate native project |
| 55 | + working-directory: apps/mobile |
| 56 | + run: npx expo prebuild --clean --platform ios |
| 57 | + |
| 58 | + - name: Build Release app without signing |
| 59 | + working-directory: apps/mobile/ios |
| 60 | + run: | |
| 61 | + workspace="$(ls -d ./*.xcworkspace | head -n 1)" |
| 62 | + scheme="$(basename "$workspace" .xcworkspace)" |
| 63 | + echo "Building scheme $scheme" |
| 64 | + xcodebuild \ |
| 65 | + -workspace "$workspace" \ |
| 66 | + -scheme "$scheme" \ |
| 67 | + -configuration Release \ |
| 68 | + -sdk iphoneos \ |
| 69 | + -destination 'generic/platform=iOS' \ |
| 70 | + -derivedDataPath build \ |
| 71 | + CODE_SIGNING_ALLOWED=NO \ |
| 72 | + CODE_SIGNING_REQUIRED=NO \ |
| 73 | + CODE_SIGN_IDENTITY="" \ |
| 74 | + DEVELOPMENT_TEAM="" \ |
| 75 | + > xcodebuild.log 2>&1 || { grep -E "error:|BUILD FAILED" xcodebuild.log | tail -n 60; tail -n 80 xcodebuild.log; exit 1; } |
| 76 | + tail -n 5 xcodebuild.log |
| 77 | +
|
| 78 | + - name: Package IPA |
| 79 | + working-directory: apps/mobile/ios |
| 80 | + run: | |
| 81 | + app="$(find build/Build/Products/Release-iphoneos -maxdepth 1 -name '*.app' | head -n 1)" |
| 82 | + test -n "$app" |
| 83 | + mkdir -p Payload |
| 84 | + cp -R "$app" Payload/ |
| 85 | + zip -qry ../../../T3Code-personal-unsigned.ipa Payload |
| 86 | + ls -lh ../../../T3Code-personal-unsigned.ipa |
| 87 | +
|
| 88 | + - name: Upload IPA |
| 89 | + uses: actions/upload-artifact@v7 |
| 90 | + with: |
| 91 | + name: T3Code-personal-unsigned-ipa |
| 92 | + path: T3Code-personal-unsigned.ipa |
| 93 | + if-no-files-found: error |
| 94 | + retention-days: 30 |
| 95 | + |
| 96 | + - name: Upload build log |
| 97 | + if: always() |
| 98 | + uses: actions/upload-artifact@v7 |
| 99 | + with: |
| 100 | + name: xcodebuild-log |
| 101 | + path: apps/mobile/ios/xcodebuild.log |
| 102 | + if-no-files-found: ignore |
| 103 | + retention-days: 14 |
0 commit comments