From b30fb3b19c47acdff40f0f31512fb12616664fb5 Mon Sep 17 00:00:00 2001 From: Luna Date: Sat, 18 Apr 2026 12:03:49 +0200 Subject: [PATCH] fix(ci): align with time-until eas init + local eas build flow --- .gitea/workflows/ci.yml | 53 ++++++++++++++++++++----------- .gitea/workflows/manual-build.yml | 31 +++++++++++------- README.md | 4 +-- TODO.md | 2 +- 4 files changed, 57 insertions(+), 33 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index aa10c29..f704c67 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -9,13 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - name: 🏗 Setup repo - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: 🏗 Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v2 with: node-version: 22 - cache: pnpm - name: 🏗 Setup pnpm uses: pnpm/action-setup@v4 @@ -31,22 +30,32 @@ jobs: - name: 🏗 Setup Android SDK uses: android-actions/setup-android@v3 + - name: 🏗 Setup Expo and EAS + uses: expo/expo-github-action@v8 + with: + token: ${{ secrets.EXPO_TOKEN }} + eas-version: latest + packager: pnpm + - name: 📦 Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install - - name: 🧱 Generate native Android project - run: npx expo prebuild --platform android --non-interactive + - name: 🧩 Init EAS project + run: eas init --non-interactive - - name: 👷 Build release APK + - name: 👷 Build app run: | - cd android - ./gradlew assembleRelease --no-daemon + eas build --local \ + --non-interactive \ + --output=./app-build \ + --platform=android \ + --profile=preview - name: 📝 Rename build to APK - run: cp android/app/build/outputs/apk/release/app-release.apk luggage-list-release.apk + run: mv app-build luggage-list-release.apk - name: 📤 Upload build artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: luggage-list-android-preview-build path: luggage-list-release.apk @@ -56,21 +65,27 @@ jobs: runs-on: ubuntu-latest steps: - name: 🏗 Setup repo - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: 🏗 Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v2 with: node-version: 22 - cache: pnpm - name: 🏗 Setup pnpm uses: pnpm/action-setup@v4 with: version: latest + - name: 🏗 Setup Expo and EAS + uses: expo/expo-github-action@v8 + with: + token: ${{ secrets.EXPO_TOKEN }} + eas-version: latest + packager: pnpm + - name: 📦 Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install - name: 👷 Build web run: npx expo export --platform web @@ -79,7 +94,7 @@ jobs: run: cd dist && zip -r ../luggage-list-dist.zip . - name: 📤 Upload build artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: luggage-list-web-build path: luggage-list-dist.zip @@ -90,15 +105,15 @@ jobs: needs: [build-android, build-web] steps: - name: 🏗 Setup repo - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: 📥 Download Android artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: luggage-list-android-preview-build - name: 📥 Download Web artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: name: luggage-list-web-build diff --git a/.gitea/workflows/manual-build.yml b/.gitea/workflows/manual-build.yml index 84fd766..9846dc1 100644 --- a/.gitea/workflows/manual-build.yml +++ b/.gitea/workflows/manual-build.yml @@ -7,13 +7,12 @@ jobs: runs-on: ubuntu-latest steps: - name: 🏗 Setup repo - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: 🏗 Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v2 with: node-version: 22 - cache: pnpm - name: 🏗 Setup pnpm uses: pnpm/action-setup@v4 @@ -29,22 +28,32 @@ jobs: - name: 🏗 Setup Android SDK uses: android-actions/setup-android@v3 + - name: 🏗 Setup Expo and EAS + uses: expo/expo-github-action@v8 + with: + token: ${{ secrets.EXPO_TOKEN }} + eas-version: latest + packager: pnpm + - name: 📦 Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install - - name: 🧱 Generate native Android project - run: npx expo prebuild --platform android --non-interactive + - name: 🧩 Init EAS project + run: eas init --non-interactive - - name: 👷 Build release APK + - name: 👷 Build app run: | - cd android - ./gradlew assembleRelease --no-daemon + eas build --local \ + --non-interactive \ + --output=./app-build \ + --platform=android \ + --profile=preview - name: 📝 Rename build to APK - run: cp android/app/build/outputs/apk/release/app-release.apk luggage-list-manual.apk + run: mv app-build luggage-list-manual.apk - name: 📤 Upload build artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: luggage-list-manual-apk-build path: luggage-list-manual.apk diff --git a/README.md b/README.md index 99c058b..eeafcfd 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,5 @@ npm run start Gitea workflows are in `.gitea/workflows`: - `dev.yml`: smoke check via `expo export --platform web` on non-main branches -- `ci.yml`: Android APK build via `expo prebuild` + Gradle, web bundle export, release tag/artifacts on `main` -- `manual-build.yml`: manual Android APK build via `expo prebuild` + Gradle +- `ci.yml`: Android APK build via `eas init` + `eas build --local`, web bundle export, release tag/artifacts on `main` +- `manual-build.yml`: manual Android APK build via `eas init` + `eas build --local` diff --git a/TODO.md b/TODO.md index fe6d17d..dc1d742 100644 --- a/TODO.md +++ b/TODO.md @@ -28,4 +28,4 @@ - [x] Added trip deletion flow and confirmation - [x] Updated Gitea workflows/artifacts naming for Luggage List - [x] Ran local web export smoke checks successfully -- [x] Fixed CI build path to avoid EAS project init requirement (use expo prebuild + Gradle APK build) +- [x] Switched CI/manual APK workflow to run `eas init --non-interactive` before `eas build --local`