fix: create debug keystore on CI when secrets not configured

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Davide Ferrari
2025-12-22 17:25:31 +01:00
parent 1939b69698
commit 521e1cc881

View File

@@ -22,12 +22,21 @@ jobs:
uses: gradle/actions/setup-gradle@v4
- name: Decode keystore
if: ${{ env.KEYSTORE_BASE64 != '' }}
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
run: |
echo "$KEYSTORE_BASE64" | base64 -d > app/release.keystore
- name: Create debug keystore (fallback)
if: ${{ secrets.KEYSTORE_BASE64 == '' }}
run: |
mkdir -p ~/.android
keytool -genkey -v -keystore ~/.android/debug.keystore \
-storepass android -alias androiddebugkey -keypass android \
-keyalg RSA -keysize 2048 -validity 10000 \
-dname "CN=Android Debug,O=Android,C=US"
- name: Build Release APK
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}