name: iOS Shell App on: workflow_dispatch: inputs: upload: description: 'type "upload" to confirm upload to S3' required: false schedule: - cron: '20 5 * * 2,4,6' # 5:20 AM UTC time on every Tuesday, Thursday and Saturday pull_request: paths: - .github/workflows/shell-app-ios.yml - .ruby-version - exponent-view-template 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: โž• Add `EXPO_ROOT_DIR` to GITHUB_ENV run: echo "EXPO_ROOT_DIR=$(pwd)" >> $GITHUB_ENV - 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' - name: ๐Ÿงถ Yarn install if: steps.expo-caches.outputs.yarn-workspace-hit != 'true' run: yarn install --frozen-lockfile - name: ๐Ÿ Generate dynamic macros run: expotools ios-generate-dynamic-macros - name: ๐Ÿ“ฆ Build iOS shell app for real devices timeout-minutes: 30 run: | expotools ios-shell-app --action build --type archive --verbose true --skipRepoUpdate --shellAppSdkVersion UNVERSIONED - name: ๐Ÿ“ฆ Build iOS shell app for simulators timeout-minutes: 30 run: | expotools ios-shell-app --action build --type simulator --verbose true --skipRepoUpdate --shellAppSdkVersion UNVERSIONED - name: โœ๏ธ Set tarball name id: tarball run: echo "::set-output name=filename::ios-shell-builder-sdk-latest-${{ github.sha }}.tar.gz" - name: ๐Ÿค Package release tarball run: | tar \ -zcf ${{ steps.tarball.outputs.filename }} \ package.json \ exponent-view-template \ shellAppBase-builds \ shellAppWorkspaces \ ios - name: ๐Ÿš€ Upload shell app tarball to S3 if: ${{ github.event.inputs.upload == 'upload' }} timeout-minutes: 40 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' run: | aws s3 cp --acl public-read ${{ steps.tarball.outputs.filename }} s3://exp-artifacts echo "Release tarball uploaded to s3://exp-artifacts/${{ steps.tarball.outputs.filename }}" echo "You can deploy this by updating or creating a new file in https://github.com/expo/turtle/tree/main/shellTarballs/ios" echo "Then follow the deployment instructions: https://github.com/expo/turtle-deploy" - name: ๐Ÿ”” Notify on Slack uses: 8398a7/action-slack@v3 if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-') || github.event_name == 'schedule') 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: Shell App (iOS)