-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.51 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: "Build Android"
on:
pull_request:
branches:
- main
push:
branches:
- test-apk
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Up Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Install Android SDK Command Line Tools
run: |
mkdir -p $HOME/android-sdk
cd $HOME/android-sdk
wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip
unzip commandlinetools-linux-8512546_latest.zip
mkdir cmdline-tools
mv cmdline-tools/* cmdline-tools
rm -rf commandlinetools-linux-8512546_latest.zip
- name: Install Android SDK Platform and Build Tools
run: |
yes | $HOME/android-sdk/cmdline-tools/bin/sdkmanager --sdk_root=$HOME/android-sdk --update
yes | $HOME/android-sdk/cmdline-tools/bin/sdkmanager --sdk_root=$HOME/android-sdk "platforms;android-35" "build-tools;35.0.0"
- name: Accept Android SDK Licenses
run: yes | $HOME/android-sdk/cmdline-tools/bin/sdkmanager --sdk_root=$HOME/android-sdk --licenses
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Flutter analyze
run: flutter analyze
- name: Get dependencies
run: flutter pub get
- name: Build Android
run: flutter build apk --release