1name: iOS Client 2 3on: 4 workflow_dispatch: 5 schedule: 6 - cron: '20 5 * * 1,3,5' # 5:20 AM UTC time on every Monday, Wednesday and Friday 7 pull_request: 8 paths: 9 - .github/workflows/client-ios.yml 10 - ios/** 11 - tools/src/dynamic-macros/** 12 - tools/src/commands/IosGenerateDynamicMacros.ts 13 - tools/src/client-build/** 14 - tools/src/commands/ClientBuild.ts 15 - secrets/** 16 - fastlane/** 17 - Gemfile.lock 18 - yarn.lock 19 push: 20 branches: [main, sdk-*] 21 paths: 22 - .github/workflows/client-ios.yml 23 - ios/** 24 - tools/src/dynamic-macros/** 25 - tools/src/commands/IosGenerateDynamicMacros.ts 26 - tools/src/client-build/** 27 - tools/src/commands/ClientBuild.ts 28 - secrets/** 29 - fastlane/** 30 - Gemfile.lock 31 - yarn.lock 32 33concurrency: 34 group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} 35 cancel-in-progress: true 36 37jobs: 38 build: 39 runs-on: macos-13 40 steps: 41 - name: Checkout 42 uses: actions/checkout@v3 43 with: 44 submodules: true 45 - name: Switch to Xcode 14.3 46 run: sudo xcode-select --switch /Applications/Xcode_14.3.app 47 - name: Decrypt secrets if possible 48 uses: ./.github/actions/expo-git-decrypt 49 with: 50 key: ${{ secrets.GIT_CRYPT_KEY_BASE64 }} 51 - name: ➕ Add `bin` to GITHUB_PATH 52 run: echo "$(pwd)/bin" >> $GITHUB_PATH 53 - name: Setup Ruby and install gems 54 uses: ruby/setup-ruby@v1 55 with: 56 bundler-cache: true 57 ruby-version: 3.2.2 58 - name: ♻️ Restore caches 59 uses: ./.github/actions/expo-caches 60 id: expo-caches 61 with: 62 yarn-workspace: 'true' 63 yarn-tools: 'true' 64 ios-pods: 'true' 65 - name: Yarn install 66 if: steps.expo-caches.outputs.yarn-workspace-hit != 'true' 67 run: yarn install --frozen-lockfile 68 - name: Generating dynamic macros 69 run: expotools ios-generate-dynamic-macros 70 - name: Install CocoaPods in `ios` 71 if: steps.expo-caches.outputs.ios-pods-hit != 'true' 72 run: pod install 73 working-directory: ios 74 - name: Check which flavor to build 75 id: flavor 76 uses: dorny/paths-filter@v2 77 with: 78 # this action fails when base is not set on schedule event 79 base: ${{ github.ref }} 80 filters: | 81 versioned: 82 - ios/versioned-react-native/** 83 - ios/Exponent/Versioned/** 84 - name: Build Expo Go for simulator 85 run: | 86 [[ "$IS_VERSIONED_FLAVOR" == "true" ]] && FLAVOR="versioned" || FLAVOR="unversioned" 87 echo "Building with $FLAVOR flavor" 88 expotools client-build --platform ios --flavor $FLAVOR 89 timeout-minutes: 120 90 env: 91 IS_VERSIONED_FLAVOR: ${{ github.event_name == 'schedule' || steps.flavor.outputs.versioned == 'true' }} 92 - name: Save test results 93 if: always() 94 uses: actions/upload-artifact@v3 95 with: 96 name: fastlane-logs 97 path: ~/Library/Logs/fastlane 98 - name: Notify on Slack 99 uses: 8398a7/action-slack@v3 100 if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-')) 101 env: 102 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 103 SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_ios }} 104 with: 105 channel: '#expo-ios' 106 status: ${{ job.status }} 107 fields: job,message,ref,eventName,author,took 108 author_name: Expo Go (iOS) 109