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 - exponent-view-template 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: 🍺 Setup run: | echo "$(pwd)/bin" >> $GITHUB_PATH echo "EXPO_ROOT_DIR=$(pwd)" >> $GITHUB_ENV - name: 💎 Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: bundler-cache: true - name: ♻️ Restore tools/node_modules from cache uses: actions/cache@v2 with: path: 'tools/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('tools/yarn.lock') }} - 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 }} 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-') || github.event_name == 'schedule') 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: Shell App (iOS)