mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-02-04 09:43:19 +00:00
This commit is contained in:
parent
8f18e328e0
commit
75e7bd888a
1 changed files with 20 additions and 47 deletions
63
.github/workflows/android.yaml
vendored
63
.github/workflows/android.yaml
vendored
|
|
@ -3,57 +3,30 @@
|
||||||
name: Android
|
name: Android
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
push:
|
push:
|
||||||
branches:
|
pull_request:
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: macos-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Install Nix (for nix usage)
|
||||||
uses: actions/checkout@v3
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
|
||||||
|
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
||||||
|
nix --version
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Checkout code
|
||||||
uses: actions/setup-java@v3
|
uses: actions/checkout@v6
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
- name: Setup FVM
|
- name: Collect Translation Files
|
||||||
id: fvm-config-action
|
run: |
|
||||||
uses: kuhnroyal/flutter-fvm-config-action@v2
|
cd lib/l10n
|
||||||
|
nix --extra-experimental-features 'nix-command flakes' develop --command python3 collect_translations.py
|
||||||
|
cd ../..
|
||||||
|
|
||||||
- uses: subosito/flutter-action@v2
|
- name: Build Debug APK
|
||||||
with:
|
run: |
|
||||||
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
|
nix --extra-experimental-features 'nix-command flakes' develop --command flutter build apk --debug
|
||||||
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
|
|
||||||
cache: false
|
|
||||||
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
|
|
||||||
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
|
|
||||||
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:"
|
|
||||||
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
|
|
||||||
|
|
||||||
- run: flutter --version
|
|
||||||
|
|
||||||
- name: Setup Gradle
|
|
||||||
uses: gradle/gradle-build-action@v2.4.2
|
|
||||||
with:
|
|
||||||
gradle-version: 8.7
|
|
||||||
|
|
||||||
- name: Collect Translation Files
|
|
||||||
run: |
|
|
||||||
cd lib/l10n
|
|
||||||
python3 collect_translations.py
|
|
||||||
|
|
||||||
- name: Build for Android
|
|
||||||
run: |
|
|
||||||
dart pub global activate fvm
|
|
||||||
fvm install
|
|
||||||
fvm flutter pub get
|
|
||||||
fvm flutter build apk --debug
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue