feat: simplify keystore handling conditions in APK build process
Some checks failed
Build Android APK / build (push) Has been cancelled
Some checks failed
Build Android APK / build (push) Has been cancelled
This commit is contained in:
12
.github/workflows/build-apk.yml
vendored
12
.github/workflows/build-apk.yml
vendored
@@ -35,12 +35,12 @@ jobs:
|
||||
run: npx cap sync android
|
||||
|
||||
- name: Decode keystore
|
||||
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
|
||||
if: secrets.KEYSTORE_BASE64 != ''
|
||||
run: |
|
||||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/impostor.keystore
|
||||
|
||||
- name: Create keystore.properties
|
||||
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
|
||||
if: secrets.KEYSTORE_BASE64 != ''
|
||||
run: |
|
||||
cat > android/keystore.properties << EOF
|
||||
storeFile=../impostor.keystore
|
||||
@@ -50,17 +50,17 @@ jobs:
|
||||
EOF
|
||||
|
||||
- name: Build Release APK
|
||||
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
|
||||
if: secrets.KEYSTORE_BASE64 != ''
|
||||
working-directory: android
|
||||
run: ./gradlew assembleRelease --no-daemon
|
||||
|
||||
- name: Build Debug APK (fallback)
|
||||
if: ${{ secrets.KEYSTORE_BASE64 == '' }}
|
||||
if: secrets.KEYSTORE_BASE64 == ''
|
||||
working-directory: android
|
||||
run: ./gradlew assembleDebug --no-daemon
|
||||
|
||||
- name: Upload Release APK
|
||||
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
|
||||
if: secrets.KEYSTORE_BASE64 != ''
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: impostor-game-release
|
||||
@@ -68,7 +68,7 @@ jobs:
|
||||
retention-days: 30
|
||||
|
||||
- name: Upload Debug APK (fallback)
|
||||
if: ${{ secrets.KEYSTORE_BASE64 == '' }}
|
||||
if: secrets.KEYSTORE_BASE64 == ''
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: impostor-game-debug
|
||||
|
||||
Reference in New Issue
Block a user