ci: add Android build workflow for debug APK and release AAB
Some checks failed
Android build / build (push) Has been cancelled
Some checks failed
Android build / build (push) Has been cancelled
This commit is contained in:
50
.gitea/workflows/android-build.yml
Normal file
50
.gitea/workflows/android-build.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Android build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Java 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '17'
|
||||
cache: gradle
|
||||
|
||||
- name: Set up Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Make Gradle wrapper executable
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Build debug APK
|
||||
run: ./gradlew --no-daemon clean assembleDebug
|
||||
|
||||
- name: Build release AAB
|
||||
run: ./gradlew --no-daemon bundleRelease
|
||||
|
||||
- name: Upload debug APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: debug-apk
|
||||
path: app/build/outputs/apk/debug/*.apk
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload release AAB
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-aab
|
||||
path: app/build/outputs/bundle/release/*.aab
|
||||
if-no-files-found: error
|
||||
Reference in New Issue
Block a user