From 0708a525516d51a8ffc184dc6492e193601d3ebf Mon Sep 17 00:00:00 2001 From: Gunut68 <130592445+Gunut68@users.noreply.github.com> Date: Wed, 2 Sep 2026 13:38:59 +0700 Subject: [PATCH] Add GitHub Actions workflow to build Android APK --- .github/workflows/build-apk.yml | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/build-apk.yml diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml new file mode 100644 index 0000000000..2f07c2e28f --- /dev/null +++ b/.github/workflows/build-apk.yml @@ -0,0 +1,51 @@ +name: Build Android APK + +on: + push: + branches: [ main, master ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Setup Java JDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Install Frontend Dependencies & Build + run: | + cd frontend + npm install + npm run build + + - name: Setup Capacitor and Build Android + run: | + cd frontend + npx cap init AIVideoApp com.aivideo.app --web-dir build || true + npx cap add android || true + npx cap sync android + + - name: Build Debug APK with Gradle + run: | + cd frontend/android + chmod +x gradlew + ./gradlew assembleDebug + + - name: Upload APK Artifact + uses: actions/upload-artifact@v4 + with: + name: app-debug-apk + path: frontend/android/app/build/outputs/apk/debug/app-debug.apk +