feat: enhance APK build process with keystore handling and fallback options
Some checks failed
Build Android APK / build (push) Has been cancelled

This commit is contained in:
2026-01-22 09:30:27 +01:00
parent 2bbd388524
commit ae3ce89516
2 changed files with 68 additions and 19 deletions

View File

@@ -34,12 +34,42 @@ jobs:
- name: Sync Capacitor
run: npx cap sync android
- name: Build APK
working-directory: android
run: ./gradlew assembleDebug
- name: Decode keystore
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/impostor.keystore
- name: Upload APK
uses: actions/upload-artifact@v3
- name: Create keystore.properties
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
run: |
cat > android/keystore.properties << EOF
storeFile=../impostor.keystore
storePassword=${{ secrets.KEYSTORE_PASSWORD }}
keyAlias=${{ secrets.KEY_ALIAS }}
keyPassword=${{ secrets.KEY_PASSWORD }}
EOF
- name: Build Release APK
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
working-directory: android
run: ./gradlew assembleRelease --no-daemon
- name: Build Debug APK (fallback)
if: ${{ secrets.KEYSTORE_BASE64 == '' }}
working-directory: android
run: ./gradlew assembleDebug --no-daemon
- name: Upload Release APK
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
uses: actions/upload-artifact@v4
with:
name: impostor-game-release
path: android/app/build/outputs/apk/release/app-release.apk
retention-days: 30
- name: Upload Debug APK (fallback)
if: ${{ secrets.KEYSTORE_BASE64 == '' }}
uses: actions/upload-artifact@v4
with:
name: impostor-game-debug
path: android/app/build/outputs/apk/debug/app-debug.apk