build: added test for new push #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Preview Android Build (Feature Branch) | ||
| on: | ||
| push: | ||
| branches: | ||
| - "**" | ||
| pull_request: | ||
| branches: [main] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 18 | ||
| cache: yarn | ||
| - name: 🏗 Setup EAS | ||
| uses: expo/expo-github-action@v8 | ||
| with: | ||
| eas-version: latest | ||
| token: ${{ secrets.EXPO_TOKEN }} | ||
| - name: 📦 Install dependencies | ||
| run: yarn install | ||
| - name: Trigger EAS Android build (preview) | ||
| id: eas_build | ||
| run: | | ||
| eas build --platform android --profile preview --non-interactive --json > build.json | ||
| BUILD_URL=$(cat build.json | jq -r '.[0].artifacts.buildUrl') | ||
| echo "BUILD_URL=$BUILD_URL" >> $GITHUB_ENV | ||
| - name: Post PR comment with preview link | ||
| if: github.event_name == 'pull_request' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh pr comment "$PR_URL" --body "🚀 Preview APK is ready! [Download here]($BUILD_URL)" | ||
| env: | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| BUILD_URL: ${{ env.BUILD_URL }} | ||