From a05acc4e27c999df1b49c7d725dbe70650805c0b Mon Sep 17 00:00:00 2001 From: Xor290 Date: Fri, 20 Feb 2026 14:02:18 +0100 Subject: [PATCH] chore: add CI build client panel --- .github/workflows/frontend-admin-build.yml | 96 --------------------- .github/workflows/frontend-client-build.yml | 82 ++++++++++++++++++ 2 files changed, 82 insertions(+), 96 deletions(-) create mode 100644 .github/workflows/frontend-client-build.yml diff --git a/.github/workflows/frontend-admin-build.yml b/.github/workflows/frontend-admin-build.yml index 3ff9412b..5b6639e1 100644 --- a/.github/workflows/frontend-admin-build.yml +++ b/.github/workflows/frontend-admin-build.yml @@ -32,102 +32,6 @@ jobs: working-directory: frontend-admin run: npx tsc --noEmit - build-dev-apk: - 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: frontend-admin/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: frontend-admin - run: npm ci - - - name: Inject EAS project ID - working-directory: frontend-admin - run: | - jq '.expo.extra.eas.projectId = "${{ secrets.EXPO_PROJECT_ID }}"' app.json > app.tmp.json - mv app.tmp.json app.json - - - name: Build development APK - working-directory: frontend-admin - run: eas build --platform android --profile development --non-interactive - - - name: Download development APK - working-directory: frontend-admin - run: | - APK_URL=$(eas build:list --platform android --status finished --limit 1 --json --non-interactive | jq -r '.[0].artifacts.buildUrl') - curl -L -o admin-panel-dev.apk "$APK_URL" - - - name: Upload development APK artifact - uses: actions/upload-artifact@v4 - with: - name: admin-panel-android-dev-apk - path: frontend-admin/admin-panel-dev.apk - retention-days: 14 - - build-apk: - 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: frontend-admin/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: frontend-admin - run: npm ci - - - name: Inject EAS project ID - working-directory: frontend-admin - run: | - jq '.expo.extra.eas.projectId = "${{ secrets.EXPO_PROJECT_ID }}"' app.json > app.tmp.json - mv app.tmp.json app.json - - - name: Build preview APK - working-directory: frontend-admin - env: - EAS_BUILD_NO_EXPO_GO_WARNING: true - run: eas build --platform android --profile preview --non-interactive - - - name: Download preview APK - working-directory: frontend-admin - run: | - APK_URL=$(eas build:list --platform android --status finished --limit 1 --json --non-interactive | jq -r '.[0].artifacts.buildUrl') - curl -L -o admin-panel-preview.apk "$APK_URL" - - - name: Upload preview APK artifact - uses: actions/upload-artifact@v4 - with: - name: admin-panel-android-preview-apk - path: frontend-admin/admin-panel-preview.apk - retention-days: 14 - build-apk-prod: needs: typecheck runs-on: ubuntu-latest diff --git a/.github/workflows/frontend-client-build.yml b/.github/workflows/frontend-client-build.yml new file mode 100644 index 00000000..cd18668b --- /dev/null +++ b/.github/workflows/frontend-client-build.yml @@ -0,0 +1,82 @@ +name: Frontend Admin - EAS Build + +on: + push: + branches: [main] + paths: + - "mobile/**" + pull_request: + 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 + + build-apk-prod: + 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 }}"' app.json > app.tmp.json + mv app.tmp.json app.json + + - name: Build production APK + working-directory: mobile + env: + EAS_BUILD_NO_EXPO_GO_WARNING: true + run: eas build --platform android --profile production --non-interactive + + - name: Download production APK + working-directory: mobile + run: | + APK_URL=$(eas build:list --platform android --status finished --limit 1 --json --non-interactive | jq -r '.[0].artifacts.buildUrl') + curl -L -o client-panel-prod.apk "$APK_URL" + + - name: Upload production APK artifact + uses: actions/upload-artifact@v4 + with: + name: client-panel-android-prod-apk + path: mobile/client-panel-prod.apk + retention-days: 14