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' pull_request: branches: [master] paths: - .github/workflows/shell-app-ios.yml - .ruby-version jobs: build: runs-on: macos-10.15 steps: - uses: actions/checkout@v2 with: submodules: true - name: Switch to Xcode 12.1 run: sudo xcode-select --switch /Applications/Xcode_12.1.app - name: Get cache key of git lfs files id: git-lfs run: echo "::set-output name=sha256::$(git lfs ls-files | openssl dgst -sha256)" - uses: actions/cache@v2 with: path: .git/lfs key: ${{ steps.git-lfs.outputs.sha256 }} - run: git lfs pull - run: echo "$(pwd)/bin" >> $GITHUB_PATH - run: echo "EXPO_ROOT_DIR=$(pwd)" >> $GITHUB_ENV - run: expotools ios-generate-dynamic-macros - uses: ruby/setup-ruby@v1 with: bundler-cache: true - uses: actions/cache@v2 with: path: ios/Pods key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- - 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 }} 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/master/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/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: Shell App (iOS)