mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-02-04 07:23:18 +00:00
77 lines
2 KiB
YAML
77 lines
2 KiB
YAML
# Build Android version of the app
|
|
|
|
name: Android
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Cache Nix store/cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/nix
|
|
~/.nix-profile
|
|
~/.local/share/nix
|
|
key: ${{ runner.os }}-nix-${{ hashFiles('flake.lock','flake.nix') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-nix-
|
|
|
|
- name: Cache Flutter Pub
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.pub-cache
|
|
key: ${{ runner.os }}-pub-${{ hashFiles('pubspec.lock','pubspec.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pub-
|
|
|
|
- name: Cache Gradle
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
android/.gradle
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('android/gradle.properties','android/gradle/wrapper/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Prepare Nix devshell
|
|
uses: ./.github/actions/nix-devshell
|
|
with:
|
|
prebuild: "true"
|
|
cachix_cache: ${{ secrets.CACHIX_CACHE }}
|
|
cachix_auth: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
|
|
- name: Restore Dart packages
|
|
uses: ./.github/actions/nix-devshell
|
|
with:
|
|
commands: flutter pub get
|
|
|
|
- name: Collect Translation Files
|
|
uses: ./.github/actions/nix-devshell
|
|
with:
|
|
commands: |
|
|
cd lib/l10n
|
|
python3 collect_translations.py
|
|
|
|
- name: Build Debug APK
|
|
uses: ./.github/actions/nix-devshell
|
|
with:
|
|
commands: |
|
|
flutter build apk --debug --target-platform android-arm64
|
|
|
|
- name: Upload APK artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: app-debug-apk
|
|
path: build/app/outputs/flutter-apk/*.apk
|
|
# retention-days: 90
|