name: Versioning Expo Go on: workflow_dispatch: {} schedule: - cron: '0 5 * * SUN' # 5am UTC time on each Sunday pull_request: paths: - .github/workflows/versioning.yml - tools/src/commands/AddSDKVersion.ts - tools/src/commands/RemoveSDKVersion.ts - tools/src/versioning/** concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: ios: runs-on: macos-11 steps: - name: ๐Ÿ‘€ Checkout a ref for the event uses: actions/checkout@v2 with: submodules: true - name: ๐Ÿ”จ Switch to Xcode 12.5.1 run: sudo xcode-select --switch /Applications/Xcode_12.5.1.app - name: ๐Ÿบ Setup Homebrew 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 - name: โž• Add `bin` to GITHUB_PATH run: echo "$(pwd)/bin" >> $GITHUB_PATH - name: โ™ป๏ธ Restore workspace node modules uses: actions/cache@v2 id: node-modules-cache with: path: | # See "workspaces" โ†’ "packages" in the root package.json for the source of truth of # which node_modules are affected by the root yarn.lock node_modules apps/*/node_modules home/node_modules packages/*/node_modules packages/@unimodules/*/node_modules react-native-lab/react-native/node_modules key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - name: ๐Ÿงถ Yarn install run: yarn install --frozen-lockfile - name: โ™ป๏ธ Restore node modules in tools uses: actions/cache@v2 with: path: tools/node_modules key: ${{ runner.os }}-tools-modules-${{ hashFiles('tools/yarn.lock') }} - name: ๐Ÿญ Generating dynamic macros run: expotools ios-generate-dynamic-macros - name: ๐Ÿ’Ž Setup Ruby and install gems 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- - name: ๐Ÿฅฅ Install CocoaPods in `ios` run: pod install working-directory: ios - name: ๐Ÿ“‚ Adding new SDK version run: expotools add-sdk-version --platform ios --sdkVersion next --reinstall - name: ๐Ÿ— Build versioned Expo Go for simulator run: expotools client-build --platform ios --flavor versioned timeout-minutes: 120 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - name: ๐Ÿ—‘ Removing SDK version run: expotools remove-sdk-version --platform ios --sdkVersion latest - name: ๐Ÿ™ Git working dir is clean run: git diff --exit-code - 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,message,ref,eventName,author,took author_name: Versioning Expo Go (iOS)