Files
projet_gestion_commande/.github/workflows/frontend-client-build.yml
T
2026-03-01 15:19:23 +01:00

68 lines
1.9 KiB
YAML

name: Frontend Client - EAS Update
on:
push:
branches: [main]
paths:
- "mobile/**"
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: mobile/package-lock.json
- name: Install dependencies
working-directory: mobile
run: npm ci
- name: Typecheck
working-directory: mobile
run: npx tsc --noEmit
eas-update:
needs: typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: mobile/package-lock.json
- name: Setup Expo & EAS CLI
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
working-directory: mobile
run: npm ci
- name: Inject EAS project ID
working-directory: mobile
run: |
jq '.expo.extra.eas.projectId = "${{ secrets.EXPO_PROJECT_ID_CLIENT }}"' app.json > app.tmp.json
mv app.tmp.json app.json
- name: Map channel to branch
working-directory: mobile
run: eas channel:edit production --branch main --non-interactive
- name: Publish OTA update
working-directory: mobile
run: eas update --channel production --platform android --message "${{ github.event.head_commit.message }}" --non-interactive