build.yml
This commit is contained in:
@@ -3,8 +3,6 @@ name: Build PixelIMS APK
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -24,14 +22,32 @@ jobs:
|
|||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
- name: Cache Gradle packages
|
||||||
run: chmod +x gradlew
|
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
|
- name: Install Gradle
|
||||||
run: ./gradlew assembleRelease --stacktrace
|
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
|
- name: Upload APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: PixelIMS-release
|
name: PixelIMS-release
|
||||||
path: app/build/outputs/apk/release/*.apk
|
path: app/build/outputs/apk/release/*.apk
|
||||||
|
if-no-files-found: error
|
||||||
|
|||||||
Reference in New Issue
Block a user