fix(ci): remove EAS init dependency by building APK via prebuild+gradle
This commit is contained in:
@@ -9,12 +9,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
|
||||
- name: 🏗 Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
@@ -30,29 +31,22 @@ 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
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: 👷 Build app
|
||||
- name: 🧱 Generate native Android project
|
||||
run: npx expo prebuild --platform android --non-interactive
|
||||
|
||||
- name: 👷 Build release APK
|
||||
run: |
|
||||
eas build --local \
|
||||
--non-interactive \
|
||||
--output=./app-build \
|
||||
--platform=android \
|
||||
--profile=preview
|
||||
cd android
|
||||
./gradlew assembleRelease --no-daemon
|
||||
|
||||
- name: 📝 Rename build to APK
|
||||
run: mv app-build luggage-list-release.apk
|
||||
run: cp android/app/build/outputs/apk/release/app-release.apk luggage-list-release.apk
|
||||
|
||||
- name: 📤 Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: luggage-list-android-preview-build
|
||||
path: luggage-list-release.apk
|
||||
@@ -62,27 +56,21 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
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
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: 👷 Build web
|
||||
run: npx expo export --platform web
|
||||
@@ -91,7 +79,7 @@ jobs:
|
||||
run: cd dist && zip -r ../luggage-list-dist.zip .
|
||||
|
||||
- name: 📤 Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: luggage-list-web-build
|
||||
path: luggage-list-dist.zip
|
||||
@@ -102,15 +90,15 @@ jobs:
|
||||
needs: [build-android, build-web]
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 📥 Download Android artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: luggage-list-android-preview-build
|
||||
|
||||
- name: 📥 Download Web artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: luggage-list-web-build
|
||||
|
||||
|
||||
@@ -7,12 +7,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🏗 Setup repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🏗 Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
|
||||
- name: 🏗 Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
@@ -28,29 +29,22 @@ 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
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: 👷 Build app
|
||||
- name: 🧱 Generate native Android project
|
||||
run: npx expo prebuild --platform android --non-interactive
|
||||
|
||||
- name: 👷 Build release APK
|
||||
run: |
|
||||
eas build --local \
|
||||
--non-interactive \
|
||||
--output=./app-build \
|
||||
--platform=android \
|
||||
--profile=preview
|
||||
cd android
|
||||
./gradlew assembleRelease --no-daemon
|
||||
|
||||
- name: 📝 Rename build to APK
|
||||
run: mv app-build luggage-list-manual.apk
|
||||
run: cp android/app/build/outputs/apk/release/app-release.apk luggage-list-manual.apk
|
||||
|
||||
- name: 📤 Upload build artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: luggage-list-manual-apk-build
|
||||
path: luggage-list-manual.apk
|
||||
|
||||
@@ -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 preview APK + web bundle + release tag/artifacts on `main`
|
||||
- `manual-build.yml`: manual APK build
|
||||
- `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
|
||||
|
||||
1
TODO.md
1
TODO.md
@@ -28,3 +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)
|
||||
|
||||
Reference in New Issue
Block a user