name: iOS Client on: workflow_dispatch: inputs: releaseSimulator: description: 'type "release-simulator" to confirm upload' required: false pull_request: branches: [master] paths: - .github/workflows/client-ios.yml - ios/** - tools/** - secrets/** - fastlane/** - Gemfile.lock - .ruby-version push: branches: [master, sdk-*] paths: - .github/workflows/client-ios.yml - ios/** - tools/** - secrets/** - fastlane/** - Gemfile.lock - .ruby-version jobs: build: runs-on: macos-10.15 steps: - uses: actions/checkout@v2 with: submodules: true - run: brew install git-crypt - name: decrypt secrets if possible env: GIT_CRYPT_KEY_BASE64: ${{ secrets.GIT_CRYPT_KEY_BASE64 }} run: | if [[ ${GIT_CRYPT_KEY_BASE64:-unset} = unset ]]; then echo 'git-crypt key not present in environment' else git crypt unlock <(echo $GIT_CRYPT_KEY_BASE64 | base64 --decode) fi - run: echo "$(pwd)/bin" >> $GITHUB_PATH - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - name: ♻️ Restore yarn cache uses: actions/cache@v2 with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: 🧶 Yarn install run: yarn install --frozen-lockfile - name: ♻️ Restore tools/node_modules from cache uses: actions/cache@v2 with: path: 'tools/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('tools/yarn.lock') }} - run: expotools ios-generate-dynamic-macros - uses: ruby/setup-ruby@v1 with: bundler-cache: true - name: Restore ios/Pods from cache uses: actions/cache@v2 with: path: 'ios/Pods' key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- - run: expotools client-build --platform ios timeout-minutes: 120 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - name: Save test results if: always() uses: actions/upload-artifact@v2 with: name: fastlane-logs path: ~/Library/Logs/fastlane - 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 }} EXPO_VERSIONS_SECRET: ${{ secrets.EXPO_VERSIONS_SECRET }} - name: 🔔 Notify on Slack uses: 8398a7/action-slack@v3 if: failure() && (github.event.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/heads/sdk-')) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_ios }} with: channel: '#platform-ios' status: ${{ job.status }} fields: job,commit,ref,eventName,author,took author_name: Expo Go (iOS)