Skip to content

build: added test for new push #6

build: added test for new push

build: added test for new push #6

name: Preview Android Build (Feature Branch)
on:
push:
branches:
- "**"
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

Check failure on line 14 in .github/workflows/preview-android-feature.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/preview-android-feature.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
- 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 }}