1name: iOS Shell App 2 3on: 4 workflow_dispatch: 5 inputs: 6 upload: 7 description: 'type "upload" to confirm upload to S3' 8 required: false 9 schedule: 10 - cron: '20 5 * * 2,4,6' 11 pull_request: 12 paths: 13 - .github/workflows/shell-app-ios.yml 14 - .ruby-version 15 - exponent-view-template 16 17concurrency: 18 group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} 19 cancel-in-progress: true 20 21jobs: 22 build: 23 runs-on: macos-11 24 steps: 25 - uses: actions/checkout@v2 26 with: 27 submodules: true 28 - name: Switch to Xcode 13.0 29 run: sudo xcode-select --switch /Applications/Xcode_13.0.app 30 - name: Setup 31 run: | 32 echo "$(pwd)/bin" >> $GITHUB_PATH 33 echo "EXPO_ROOT_DIR=$(pwd)" >> $GITHUB_ENV 34 - name: Setup Ruby and install gems 35 uses: ruby/setup-ruby@v1 36 with: 37 bundler-cache: true 38 - name: ♻️ Restore workspace node modules 39 uses: actions/cache@v2 40 id: node-modules-cache 41 with: 42 path: | 43 # See "workspaces" → "packages" in the root package.json for the source of truth of 44 # which node_modules are affected by the root yarn.lock 45 node_modules 46 apps/*/node_modules 47 home/node_modules 48 packages/*/node_modules 49 packages/@expo/*/node_modules 50 packages/@unimodules/*/node_modules 51 react-native-lab/react-native/node_modules 52 key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} 53 - name: Yarn install 54 run: yarn install --frozen-lockfile 55 - name: ♻️ Restore tools/node_modules from cache 56 uses: actions/cache@v2 57 with: 58 path: 'tools/node_modules' 59 key: ${{ runner.os }}-modules-${{ hashFiles('tools/yarn.lock') }} 60 - name: Generate dynamic macros 61 run: expotools ios-generate-dynamic-macros 62 - name: Build iOS shell app for real devices 63 timeout-minutes: 30 64 run: | 65 expotools ios-shell-app --action build --type archive --verbose true --skipRepoUpdate --shellAppSdkVersion UNVERSIONED 66 - name: Build iOS shell app for simulators 67 timeout-minutes: 30 68 run: | 69 expotools ios-shell-app --action build --type simulator --verbose true --skipRepoUpdate --shellAppSdkVersion UNVERSIONED 70 - name: ✏️ Set tarball name 71 id: tarball 72 run: echo "::set-output name=filename::ios-shell-builder-sdk-latest-${{ github.sha }}.tar.gz" 73 - name: Package release tarball 74 run: | 75 tar \ 76 -zcf ${{ steps.tarball.outputs.filename }} \ 77 package.json \ 78 exponent-view-template \ 79 shellAppBase-builds \ 80 shellAppWorkspaces \ 81 ios 82 - name: Upload shell app tarball to S3 83 if: ${{ github.event.inputs.upload == 'upload' }} 84 timeout-minutes: 40 85 env: 86 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 87 AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 88 run: | 89 aws s3 cp --acl public-read ${{ steps.tarball.outputs.filename }} s3://exp-artifacts 90 echo "Release tarball uploaded to s3://exp-artifacts/${{ steps.tarball.outputs.filename }}" 91 echo "You can deploy this by updating or creating a new file in https://github.com/expo/turtle/tree/main/shellTarballs/ios" 92 echo "Then follow the deployment instructions: https://github.com/expo/turtle-deploy" 93 - name: Notify on Slack 94 uses: 8398a7/action-slack@v3 95 if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-') || github.event_name == 'schedule') 96 env: 97 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 98 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_IOS }} 99 with: 100 channel: '#expo-ios' 101 status: ${{ job.status }} 102 fields: job,message,ref,eventName,author,took 103 author_name: Shell App (iOS) 104