feat: update APK build process to rename output and publish latest release
All checks were successful
Build Android APK / build (push) Successful in 6m31s
All checks were successful
Build Android APK / build (push) Successful in 6m31s
This commit is contained in:
@@ -5,6 +5,9 @@ on:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -59,18 +62,23 @@ jobs:
|
||||
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: Rename APK
|
||||
run: |
|
||||
if [ -f android/app/build/outputs/apk/release/app-release.apk ]; then
|
||||
cp android/app/build/outputs/apk/release/app-release.apk impostor-game.apk
|
||||
else
|
||||
cp android/app/build/outputs/apk/debug/app-debug.apk impostor-game.apk
|
||||
fi
|
||||
|
||||
- name: Upload Debug APK (fallback)
|
||||
if: ${{ secrets.KEYSTORE_BASE64 == '' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
- name: Update latest release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: impostor-game-debug
|
||||
path: android/app/build/outputs/apk/debug/app-debug.apk
|
||||
retention-days: 30
|
||||
tag_name: latest
|
||||
name: Latest Build
|
||||
body: |
|
||||
Última versión del APK generada automáticamente.
|
||||
|
||||
Commit: ${{ github.sha }}
|
||||
files: impostor-game.apk
|
||||
prerelease: false
|
||||
make_latest: true
|
||||
|
||||
34
.github/workflows/build-apk.yml
vendored
34
.github/workflows/build-apk.yml
vendored
@@ -5,6 +5,9 @@ on:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -70,18 +73,23 @@ jobs:
|
||||
working-directory: android
|
||||
run: ./gradlew assembleDebug --no-daemon
|
||||
|
||||
- name: Upload Release APK
|
||||
if: steps.keystore-check.outputs.exists == 'true'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: impostor-game-release
|
||||
path: android/app/build/outputs/apk/release/app-release.apk
|
||||
retention-days: 30
|
||||
- name: Rename APK
|
||||
run: |
|
||||
if [ "${{ steps.keystore-check.outputs.exists }}" == "true" ]; then
|
||||
cp android/app/build/outputs/apk/release/app-release.apk impostor-game.apk
|
||||
else
|
||||
cp android/app/build/outputs/apk/debug/app-debug.apk impostor-game.apk
|
||||
fi
|
||||
|
||||
- name: Upload Debug APK (fallback)
|
||||
if: steps.keystore-check.outputs.exists == 'false'
|
||||
uses: actions/upload-artifact@v4
|
||||
- name: Update latest release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: impostor-game-debug
|
||||
path: android/app/build/outputs/apk/debug/app-debug.apk
|
||||
retention-days: 30
|
||||
tag_name: latest
|
||||
name: Latest Build
|
||||
body: |
|
||||
Última versión del APK generada automáticamente.
|
||||
|
||||
Commit: ${{ github.sha }}
|
||||
files: impostor-game.apk
|
||||
prerelease: false
|
||||
make_latest: true
|
||||
Reference in New Issue
Block a user