From 72d1b19743f853d5ffb94a0b749b79723edcb283 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Thu, 18 Jun 2026 20:26:42 +0000 Subject: [PATCH] ci(android): publish signed AAB + universal APK to Gitea generic registry Build a universal release APK alongside the AAB and push both to the public generic registry (punktfunk-android//) before the Play upload, so artifacts are downloadable even while the Play step is still failing. Matches windows-msix.yml / deb.yml (REGISTRY_TOKEN, user enricobuehler). Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/android.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/android.yml b/.gitea/workflows/android.yml index 9b20a9d..631033b 100644 --- a/.gitea/workflows/android.yml +++ b/.gitea/workflows/android.yml @@ -69,7 +69,7 @@ jobs: VERSION_CODE: ${{ github.run_number }} run: ./gradlew :app:assembleDebug --stacktrace - - name: Build Release Bundle (AAB) + - name: Build Release (signed AAB + universal APK) if: github.event_name == 'push' && github.ref == 'refs/heads/main' working-directory: clients/android env: @@ -80,7 +80,28 @@ jobs: RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }} run: | echo "${{ secrets.RELEASE_KEYSTORE_BASE64 }}" | base64 -d > release.jks - ./gradlew :app:bundleRelease --stacktrace + # AAB for Play; a universal APK (both ABIs) for direct sideload/testing — same upload key. + ./gradlew :app:bundleRelease :app:assembleRelease --stacktrace + + # Publish BEFORE the Play upload so artifacts land even while the Play step is still failing. + # Generic registry is public for reads — matches windows-msix.yml / deb.yml (REGISTRY_TOKEN, user enricobuehler). + - name: Publish AAB + APK to Gitea generic registry + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + env: + REGISTRY: git.unom.io + OWNER: unom + PKG: punktfunk-android + VERSION: ${{ github.run_number }} + REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} + run: | + AAB=clients/android/app/build/outputs/bundle/release/app-release.aab + APK=clients/android/app/build/outputs/apk/release/app-release.apk + base="https://$REGISTRY/api/packages/$OWNER/generic/$PKG/$VERSION" + curl -fsS --user "enricobuehler:$REGISTRY_TOKEN" --upload-file "$AAB" "$base/punktfunk-android-r$VERSION.aab" + curl -fsS --user "enricobuehler:$REGISTRY_TOKEN" --upload-file "$APK" "$base/punktfunk-android-r$VERSION.apk" + echo "Published artifacts (versionCode=$VERSION):" + echo " $base/punktfunk-android-r$VERSION.aab" + echo " $base/punktfunk-android-r$VERSION.apk" - name: Upload to Google Play (Internal Testing) if: github.event_name == 'push' && github.ref == 'refs/heads/main'