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]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -59,18 +62,23 @@ jobs:
|
|||||||
working-directory: android
|
working-directory: android
|
||||||
run: ./gradlew assembleDebug --no-daemon
|
run: ./gradlew assembleDebug --no-daemon
|
||||||
|
|
||||||
- name: Upload Release APK
|
- name: Rename APK
|
||||||
if: ${{ secrets.KEYSTORE_BASE64 != '' }}
|
run: |
|
||||||
uses: actions/upload-artifact@v4
|
if [ -f android/app/build/outputs/apk/release/app-release.apk ]; then
|
||||||
with:
|
cp android/app/build/outputs/apk/release/app-release.apk impostor-game.apk
|
||||||
name: impostor-game-release
|
else
|
||||||
path: android/app/build/outputs/apk/release/app-release.apk
|
cp android/app/build/outputs/apk/debug/app-debug.apk impostor-game.apk
|
||||||
retention-days: 30
|
fi
|
||||||
|
|
||||||
- name: Upload Debug APK (fallback)
|
- name: Update latest release
|
||||||
if: ${{ secrets.KEYSTORE_BASE64 == '' }}
|
uses: softprops/action-gh-release@v2
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: impostor-game-debug
|
tag_name: latest
|
||||||
path: android/app/build/outputs/apk/debug/app-debug.apk
|
name: Latest Build
|
||||||
retention-days: 30
|
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]
|
branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -70,18 +73,23 @@ jobs:
|
|||||||
working-directory: android
|
working-directory: android
|
||||||
run: ./gradlew assembleDebug --no-daemon
|
run: ./gradlew assembleDebug --no-daemon
|
||||||
|
|
||||||
- name: Upload Release APK
|
- name: Rename APK
|
||||||
if: steps.keystore-check.outputs.exists == 'true'
|
run: |
|
||||||
uses: actions/upload-artifact@v4
|
if [ "${{ steps.keystore-check.outputs.exists }}" == "true" ]; then
|
||||||
with:
|
cp android/app/build/outputs/apk/release/app-release.apk impostor-game.apk
|
||||||
name: impostor-game-release
|
else
|
||||||
path: android/app/build/outputs/apk/release/app-release.apk
|
cp android/app/build/outputs/apk/debug/app-debug.apk impostor-game.apk
|
||||||
retention-days: 30
|
fi
|
||||||
|
|
||||||
- name: Upload Debug APK (fallback)
|
- name: Update latest release
|
||||||
if: steps.keystore-check.outputs.exists == 'false'
|
uses: softprops/action-gh-release@v2
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: impostor-game-debug
|
tag_name: latest
|
||||||
path: android/app/build/outputs/apk/debug/app-debug.apk
|
name: Latest Build
|
||||||
retention-days: 30
|
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