From 69a40023e99a50c04468842491a6af0999e93aa5 Mon Sep 17 00:00:00 2001 From: Mikael Hugo Date: Fri, 15 May 2026 03:04:25 +0200 Subject: [PATCH] ci(android): add GitHub Actions workflows for debug APK builds Adds two workflows: - build-fdroid-debug.yml: builds fdroidDebug variant (no Firebase) - build-play-debug.yml: builds playDebug variant (with Firebase) Both run on push/PR to main and upload APK artifacts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build-fdroid-debug.yml | 46 ++++++++++++++++++++++++ .github/workflows/build-play-debug.yml | 46 ++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 .github/workflows/build-fdroid-debug.yml create mode 100644 .github/workflows/build-play-debug.yml diff --git a/.github/workflows/build-fdroid-debug.yml b/.github/workflows/build-fdroid-debug.yml new file mode 100644 index 00000000..72c6ba47 --- /dev/null +++ b/.github/workflows/build-fdroid-debug.yml @@ -0,0 +1,46 @@ +name: Build F-Droid Debug APK + +on: + push: + branches: [main] + paths: + - 'app/**' + - '.github/workflows/build-fdroid-debug.yml' + pull_request: + branches: [main] + paths: + - 'app/**' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: ${{ runner.os }}-gradle- + + - name: Build F-Droid Debug APK + run: ./gradlew :app:assembleFdroidDebug --no-daemon + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: centralcloud-oncall-fdroid-debug + path: app/build/outputs/apk/fdroid/debug/*.apk diff --git a/.github/workflows/build-play-debug.yml b/.github/workflows/build-play-debug.yml new file mode 100644 index 00000000..f23f5c00 --- /dev/null +++ b/.github/workflows/build-play-debug.yml @@ -0,0 +1,46 @@ +name: Build Play Debug APK + +on: + push: + branches: [main] + paths: + - 'app/**' + - '.github/workflows/build-play-debug.yml' + pull_request: + branches: [main] + paths: + - 'app/**' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: ${{ runner.os }}-gradle- + + - name: Build Play Debug APK + run: ./gradlew :app:assemblePlayDebug --no-daemon + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: centralcloud-oncall-play-debug + path: app/build/outputs/apk/play/debug/*.apk