name: iOS Client on: workflow_dispatch: inputs: releaseSimulator: description: 'type "release-simulator" to confirm upload' required: false pull_request: branches: [master] paths: - .github/workflows/client-ios.yml - ios/** - tools/expotools/** - secrets/** - fastlane/** - Gemfile.lock - .ruby-version push: branches: [master, sdk-*] paths: - .github/workflows/client-ios.yml - ios/** - tools/expotools/** - secrets/** - fastlane/** - Gemfile.lock - .ruby-version jobs: build: runs-on: macos-10.15 steps: - uses: actions/checkout@v2 with: submodules: true lfs: true - run: brew install git-crypt - name: decrypt secrets if possible env: GIT_CRYPT_KEY_BASE64: ${{ secrets.GIT_CRYPT_KEY_BASE64 }} run: | if [[ ${GIT_CRYPT_KEY_BASE64:-unset} = unset ]]; then echo 'git-crypt key not present in environment' else git crypt unlock <(echo $GIT_CRYPT_KEY_BASE64 | base64 --decode) fi - run: echo "$(pwd)/bin" >> $GITHUB_PATH - run: expotools ios-generate-dynamic-macros - uses: ruby/setup-ruby@v1 with: bundler-cache: true - run: expotools client-build --platform ios timeout-minutes: 120 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - name: Save test results if: always() uses: actions/upload-artifact@v2 with: name: fastlane-logs path: ~/Library/Logs/fastlane - run: expotools client-build --platform ios --release # should only upload already-built app if: ${{ github.event.inputs.releaseSimulator == 'release-simulator' }} env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} EXPO_VERSIONS_SECRET: ${{ secrets.EXPO_VERSIONS_SECRET }} - 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: custom fields: author,commit,ref,workflow custom_payload: | { username: 'github-actions', icon_emoji: ':octocat:', attachments: [{ color: 'danger', text: `${process.env.AS_WORKFLOW}@${process.env.AS_REF} failed: ${process.env.AS_COMMIT} by ${process.env.AS_AUTHOR}`, }] }