feat: update 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
|
run: npx cap sync android
|
||||||
|
|
||||||
- name: Decode keystore
|
- name: Decode keystore
|
||||||
if: secrets.KEYSTORE_BASE64 != ''
|
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/impostor.keystore
|
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/impostor.keystore
|
||||||
|
|
||||||
- name: Create keystore.properties
|
- name: Create keystore.properties
|
||||||
if: secrets.KEYSTORE_BASE64 != ''
|
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
|
||||||
run: |
|
run: |
|
||||||
cat > android/keystore.properties << EOF
|
cat > android/keystore.properties << EOF
|
||||||
storeFile=../impostor.keystore
|
storeFile=../impostor.keystore
|
||||||
@@ -50,17 +50,17 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Build Release APK
|
- name: Build Release APK
|
||||||
if: secrets.KEYSTORE_BASE64 != ''
|
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
|
||||||
working-directory: android
|
working-directory: android
|
||||||
run: ./gradlew assembleRelease --no-daemon
|
run: ./gradlew assembleRelease --no-daemon
|
||||||
|
|
||||||
- name: Build Debug APK (fallback)
|
- name: Build Debug APK (fallback)
|
||||||
if: secrets.KEYSTORE_BASE64 == ''
|
if: ${{ secrets.KEYSTORE_BASE64 == '' }}
|
||||||
working-directory: android
|
working-directory: android
|
||||||
run: ./gradlew assembleDebug --no-daemon
|
run: ./gradlew assembleDebug --no-daemon
|
||||||
|
|
||||||
- name: Upload Release APK
|
- name: Upload Release APK
|
||||||
if: secrets.KEYSTORE_BASE64 != ''
|
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: impostor-game-release
|
name: impostor-game-release
|
||||||
@@ -68,7 +68,7 @@ jobs:
|
|||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Upload Debug APK (fallback)
|
- name: Upload Debug APK (fallback)
|
||||||
if: secrets.KEYSTORE_BASE64 == ''
|
if: ${{ secrets.KEYSTORE_BASE64 == '' }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: impostor-game-debug
|
name: impostor-game-debug
|
||||||
|
|||||||
Reference in New Issue
Block a user