build.yml
This commit is contained in:
@@ -3,8 +3,6 @@ name: Build PixelIMS APK
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -24,14 +22,32 @@ jobs:
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Build Release APK
|
||||
run: ./gradlew assembleRelease --stacktrace
|
||||
- name: Install Gradle
|
||||
run: |
|
||||
wget https://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
unzip -q gradle-8.9-bin.zip
|
||||
export PATH=$PATH:$PWD/gradle-8.9/bin
|
||||
gradle --version
|
||||
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
export PATH=$PATH:$PWD/gradle-8.9/bin
|
||||
cd $GITHUB_WORKSPACE
|
||||
gradle assembleRelease --stacktrace --no-daemon
|
||||
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: PixelIMS-release
|
||||
path: app/build/outputs/apk/release/*.apk
|
||||
if-no-files-found: error
|
||||
|
||||
Reference in New Issue
Block a user