From 65d612e59808617dc5440e4c4d6ced5cb5b22bba Mon Sep 17 00:00:00 2001 From: Sara Tavares <29093946+stavares843@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:39:18 +0100 Subject: [PATCH] chore(ci): generate apk (#604) --- .github/workflows/generate-apk.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/generate-apk.yml diff --git a/.github/workflows/generate-apk.yml b/.github/workflows/generate-apk.yml new file mode 100644 index 000000000..87ac71af6 --- /dev/null +++ b/.github/workflows/generate-apk.yml @@ -0,0 +1,41 @@ +name: Generate Android APK +on: + pull_request: + types: [opened, synchronize, reopened, edited] + +jobs: + build: + permissions: write-all + runs-on: ubuntu-latest + steps: + - name: Checkout 🔖 + uses: actions/checkout@v4.1.7 + + - name: Setup Node.js 🔨 + uses: actions/setup-node@v4.0.4 + with: + node-version: 20 + + - name: Install Dependencies 🔨 + run: npm i + + - name: Build Web Assets 🔨 + run: npm run build + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: '17' + + - name: Set up Android SDK + uses: android-actions/setup-android@v2 + + - name: Sync Capacitor Assets 🔨 + run: npx cap sync && npx cap copy android && cd android && ./gradlew assembleDebug + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: debug-apk + path: android/app/build/outputs/apk/debug/app-debug.apk