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 +