Skip to content

Fix github action

Fix github action #435

Workflow file for this run

name: AndroidBuild
on:
pull_request:
branches: [ develop ]
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'adopt'
cache: 'gradle'
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.android/build-cache
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Create local.properties
env:
RELEASE_API_KEY: ${{ secrets.RELEASE_API_KEY }}
run: |
echo "RELEASE_API_KEY=${RELEASE_API_KEY}" > local.properties
cat local.properties
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Display Gradle version and info
run: |
./gradlew --version
./gradlew projects
- name: Clean project with debug
run: ./gradlew clean --info --stacktrace
- name: Build Release APK with debug
run: ./gradlew assembleRelease --info --stacktrace
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.debug=true"
- name: List build outputs
if: always()
run: |
echo "Listing build outputs:"
ls -la app/build/outputs/apk/release/ || echo "Release directory not found"
- name: Upload Build Report
if: always()
uses: actions/[email protected]
with:
name: build-reports
path: |
app/build/reports/
app/build/outputs/logs/
- name: Upload APK
if: success()
uses: actions/[email protected]
with:
name: WalliesCompose-release
path: app/build/outputs/apk/release/app-release.apk
retention-days: 7