Skip to content

Refactor

Refactor #594

Workflow file for this run

name: Android CI
on:
pull_request:
push:
branches:
- 'main'
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/[email protected]
- name: Setup Java 17
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: '17'
check-latest: false
# Enable caching for Gradle dependencies
- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6
# Build the project
- name: Build with Gradle
run: ./gradlew build
# Run Android Lint to check for code issues
- name: Run Android Lint
run: ./gradlew lint
# Build the debug bundle
- name: Bundle (Debug)
run: ./gradlew bundleDebug
# Upload the debug bundle
- name: Upload APK (Debug)
uses: actions/[email protected]
with:
name: Debug-APK
path: app/build/outputs/apk/debug/app-debug.apk
# Build the release bundle
- name: Build Bundle (Release)
if: github.ref == 'refs/heads/main'
run: ./gradlew bundleRelease
# Upload the release bundle
- name: Upload Bundle (Release)
if: github.ref == 'refs/heads/main'
uses: actions/[email protected]
with:
name: Release-Bundle
path: app/build/outputs/bundle/release/app-release.aab