Files
Folo/.github/workflows/build-ios-development.yml
T
dependabot[bot] 497d872a5c build(deps): bump expo/expo-github-action from 8 to 9 (#5019)
Bumps [expo/expo-github-action](https://github.com/expo/expo-github-action) from 8 to 9.
- [Release notes](https://github.com/expo/expo-github-action/releases)
- [Changelog](https://github.com/expo/expo-github-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expo/expo-github-action/compare/v8...v9)

---
updated-dependencies:
- dependency-name: expo/expo-github-action
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-19 09:19:59 +08:00

182 lines
5.7 KiB
YAML

name: 📱 Build iOS for development
on:
push:
branches:
- "**"
paths:
- "apps/mobile/web-app/**"
- "apps/mobile/native/**"
- "apps/mobile/package.json"
- "apps/mobile/app.config.ts"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-runner:
runs-on: ubuntu-latest
outputs:
runner-label: ${{ steps.set-runner.outputs.runner-label }}
steps:
- name: Set runner
id: set-runner
run: |
runners=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.RUNNER_GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/actions/runners")
available=$(echo "$runners" | jq '.runners[]? | select(.status == "online" and .busy == false and .labels[] .name == "macOS")')
if [ -n "$available" ]; then
echo "runner-label=self-hosted" >> $GITHUB_OUTPUT
else
echo "runner-label=macos-latest" >> $GITHUB_OUTPUT
fi
build-ipa-device-self-hosted:
name: Build iOS IPA for device (self-hosted)
if: github.secret_source != 'None' && needs.check-runner.outputs.runner-label == 'self-hosted'
needs: check-runner
runs-on: [self-hosted, macOS]
steps:
- name: 📦 Checkout code
uses: actions/checkout@v7
- name: 📱 Setup EAS
uses: expo/expo-github-action@v9
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile --child-concurrency=1
- name: Build mobile web assets
run: pnpm --dir apps/mobile/web-app build --outDir ../../../out/rn-web/html-renderer
- name: 🔨 Build iOS IPA
working-directory: apps/mobile
run: eas build --platform ios --profile development --non-interactive --local --output=./build.ipa
env:
EAS_BUILD_DISABLE_EXPO_DOCTOR_STEP: "1"
EAS_NO_FROZEN_LOCKFILE: "1"
SENTRY_AUTH_TOKEN: ${{ secrets.RN_SENTRY_AUTH_TOKEN }}
CI: true
npm_config_node_linker: isolated
npm_config_shamefully_hoist: "false"
# Optional: Upload artifact
- name: 📤 Upload IPA
uses: actions/upload-artifact@v7
with:
name: app-ios-development-device
path: apps/mobile/build.ipa
retention-days: 90
- name: Clear Xcode cache
run: |
rm -rf ~/Library/Developer/Xcode/DerivedData
build-ipa-device-github:
name: Build iOS IPA for device (GitHub-hosted)
if: github.secret_source != 'None' && needs.check-runner.outputs.runner-label == 'macos-latest'
needs: check-runner
runs-on: macos-latest
steps:
- name: 📦 Checkout code
uses: actions/checkout@v7
- name: 🔧 Setup Xcode
uses: ./.github/actions/setup-xcode
- name: 📦 Setup pnpm
uses: pnpm/action-setup@v6
- name: 🏗 Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: "pnpm"
- name: 📱 Setup EAS
uses: expo/expo-github-action@v9
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile --child-concurrency=1
- name: Build mobile web assets
run: pnpm --dir apps/mobile/web-app build --outDir ../../../out/rn-web/html-renderer
- name: 🔨 Build iOS IPA
working-directory: apps/mobile
run: eas build --platform ios --profile development --non-interactive --local --output=./build.ipa
env:
EAS_BUILD_DISABLE_EXPO_DOCTOR_STEP: "1"
EAS_NO_FROZEN_LOCKFILE: "1"
CI: true
SENTRY_AUTH_TOKEN: ${{ secrets.RN_SENTRY_AUTH_TOKEN }}
npm_config_node_linker: isolated
npm_config_shamefully_hoist: "false"
# Optional: Upload artifact
- name: 📤 Upload IPA
uses: actions/upload-artifact@v7
with:
name: app-ios-development-device
path: apps/mobile/build.ipa
retention-days: 90
build-simulator:
name: Build iOS IPA for simulator
if: github.secret_source != 'None'
runs-on: macos-latest
steps:
- name: 📦 Checkout code
uses: actions/checkout@v7
- name: 🔧 Setup Xcode
uses: ./.github/actions/setup-xcode
- name: 📦 Setup pnpm
uses: pnpm/action-setup@v6
- name: 🏗 Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
cache: "pnpm"
- name: 📱 Setup EAS
uses: expo/expo-github-action@v9
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile --child-concurrency=1
- name: Build mobile web assets
run: pnpm --dir apps/mobile/web-app build --outDir ../../../out/rn-web/html-renderer
- name: 🔨 Build iOS IPA
working-directory: apps/mobile
run: eas build --platform ios --profile ios-simulator --non-interactive --local --output=./build-simulator.ipa
env:
EAS_BUILD_DISABLE_EXPO_DOCTOR_STEP: "1"
EAS_NO_FROZEN_LOCKFILE: "1"
CI: true
SENTRY_AUTH_TOKEN: ${{ secrets.RN_SENTRY_AUTH_TOKEN }}
npm_config_node_linker: isolated
npm_config_shamefully_hoist: "false"
# Optional: Upload artifact
- name: 📤 Upload IPA
uses: actions/upload-artifact@v7
with:
name: app-ios-development-simulator
path: apps/mobile/build-simulator.ipa
retention-days: 90