name: iOS Client on: workflow_dispatch: inputs: releaseSimulator: description: 'type "release-simulator" to confirm upload' required: false schedule: - cron: '20 5 * * 1,3,5' # 5:20 AM UTC time on every Monday, Wednesday and Friday pull_request: paths: - .github/workflows/client-ios.yml - ios/** - tools/src/dynamic-macros/** - tools/src/commands/IosGenerateDynamicMacros.ts - tools/src/client-build/** - tools/src/commands/ClientBuild.ts - secrets/** - fastlane/** - Gemfile.lock - .ruby-version - yarn.lock push: branches: [main, sdk-*] paths: - .github/workflows/client-ios.yml - ios/** - tools/src/dynamic-macros/** - tools/src/commands/IosGenerateDynamicMacros.ts - tools/src/client-build/** - tools/src/commands/ClientBuild.ts - secrets/** - fastlane/** - Gemfile.lock - .ruby-version - yarn.lock concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: build: runs-on: macos-11 steps: - name: ๐Ÿ‘€ Checkout uses: actions/checkout@v3 with: submodules: true - name: ๐Ÿ”จ Switch to Xcode 13.0 run: sudo xcode-select --switch /Applications/Xcode_13.0.app - name: ๐Ÿ”“ Decrypt secrets if possible uses: ./.github/actions/expo-git-decrypt with: key: ${{ secrets.GIT_CRYPT_KEY_BASE64 }} - name: โž• Add `bin` to GITHUB_PATH run: echo "$(pwd)/bin" >> $GITHUB_PATH - name: ๐Ÿ’Ž Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: bundler-cache: true - name: โ™ป๏ธ Restore caches uses: ./.github/actions/expo-caches id: expo-caches with: yarn-workspace: 'true' yarn-tools: 'true' ios-pods: 'true' - name: ๐Ÿงถ Yarn install if: steps.expo-caches.outputs.yarn-workspace-hit != 'true' run: yarn install --frozen-lockfile - name: ๐Ÿญ Generating dynamic macros run: expotools ios-generate-dynamic-macros - name: ๐Ÿฅฅ Install CocoaPods in `ios` if: steps.expo-caches.outputs.ios-pods-hit != 'true' run: pod install working-directory: ios - name: ๐Ÿ”Ž Check which flavor to build id: flavor uses: dorny/paths-filter@v2 with: # this action fails when base is not set on schedule event base: ${{ github.ref }} filters: | versioned: - ios/versioned-react-native/** - ios/Exponent/Versioned/** - name: ๐Ÿ— Build Expo Go for simulator run: | [[ "$IS_VERSIONED_FLAVOR" == "true" ]] && FLAVOR="versioned" || FLAVOR="unversioned" echo "Building with $FLAVOR flavor" expotools client-build --platform ios --flavor $FLAVOR timeout-minutes: 120 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: 'us-east-1' IS_VERSIONED_FLAVOR: ${{ github.event_name == 'schedule' || steps.flavor.outputs.versioned == 'true' }} - name: ๐Ÿ’พ Save test results if: always() uses: actions/upload-artifact@v3 with: name: fastlane-logs path: ~/Library/Logs/fastlane - name: ๐Ÿšš Release the simulator build run: expotools client-build --platform ios --release # should only upload already-built app if: ${{ github.event.inputs.releaseSimulator == 'release-simulator' }} env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: 'us-east-1' EXPO_VERSIONS_SECRET: ${{ secrets.EXPO_VERSIONS_SECRET }} - name: ๐Ÿ”” Notify on Slack uses: 8398a7/action-slack@v3 if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-')) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_ios }} with: channel: '#expo-ios' status: ${{ job.status }} fields: job,message,ref,eventName,author,took author_name: Expo Go (iOS)