1name: Versioning Expo Go 2 3on: 4 workflow_dispatch: {} 5 schedule: 6 - cron: '0 5 * * SUN' # 5am UTC time on each Sunday 7 pull_request: 8 paths: 9 - .github/workflows/versioning.yml 10 - tools/src/commands/AddSDKVersion.ts 11 - tools/src/commands/RemoveSDKVersion.ts 12 - tools/src/versioning/** 13 14concurrency: 15 group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} 16 cancel-in-progress: true 17 18jobs: 19 ios: 20 runs-on: macos-11 21 steps: 22 - name: Checkout a ref for the event 23 uses: actions/checkout@v2 24 with: 25 submodules: true 26 - name: Switch to Xcode 13.0 27 run: sudo xcode-select --switch /Applications/Xcode_13.0.app 28 - name: Setup Homebrew 29 run: brew install git-crypt 30 - name: decrypt secrets if possible 31 env: 32 GIT_CRYPT_KEY_BASE64: ${{ secrets.GIT_CRYPT_KEY_BASE64 }} 33 run: | 34 if [[ ${GIT_CRYPT_KEY_BASE64:-unset} = unset ]]; then 35 echo 'git-crypt key not present in environment' 36 else 37 git crypt unlock <(echo $GIT_CRYPT_KEY_BASE64 | base64 --decode) 38 fi 39 - name: ➕ Add `bin` to GITHUB_PATH 40 run: echo "$(pwd)/bin" >> $GITHUB_PATH 41 - name: ♻️ Restore workspace node modules 42 uses: actions/cache@v2 43 id: node-modules-cache 44 with: 45 path: | 46 # See "workspaces" → "packages" in the root package.json for the source of truth of 47 # which node_modules are affected by the root yarn.lock 48 node_modules 49 apps/*/node_modules 50 home/node_modules 51 packages/*/node_modules 52 packages/@expo/*/node_modules 53 packages/@unimodules/*/node_modules 54 react-native-lab/react-native/node_modules 55 key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} 56 - name: Yarn install 57 run: yarn install --frozen-lockfile 58 - name: ♻️ Restore node modules in tools 59 uses: actions/cache@v2 60 with: 61 path: tools/node_modules 62 key: ${{ runner.os }}-tools-modules-${{ hashFiles('tools/yarn.lock') }} 63 - name: Generating dynamic macros 64 run: expotools ios-generate-dynamic-macros 65 - name: Setup Ruby and install gems 66 uses: ruby/setup-ruby@v1 67 with: 68 bundler-cache: true 69 - name: ♻️ Restore ios/Pods from cache 70 uses: actions/cache@v2 71 with: 72 path: 'ios/Pods' 73 key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} 74 restore-keys: | 75 ${{ runner.os }}-pods- 76 - name: Install CocoaPods in `ios` 77 run: pod install 78 working-directory: ios 79 - name: Adding new SDK version 80 run: expotools add-sdk-version --platform ios --sdkVersion next --reinstall 81 - name: Build versioned Expo Go for simulator 82 run: expotools client-build --platform ios --flavor versioned 83 timeout-minutes: 120 84 env: 85 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 86 AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 87 - name: Removing SDK version 88 run: expotools remove-sdk-version --platform ios --sdkVersion latest 89 - name: Git working dir is clean 90 run: git diff --exit-code 91 - name: Notify on Slack 92 uses: 8398a7/action-slack@v3 93 if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-')) 94 env: 95 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 96 SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_ios }} 97 with: 98 channel: '#expo-ios' 99 status: ${{ job.status }} 100 fields: job,message,ref,eventName,author,took 101 author_name: Versioning Expo Go (iOS) 102