-
Notifications
You must be signed in to change notification settings - Fork 23
55 lines (44 loc) · 1.3 KB
/
main.yml
File metadata and controls
55 lines (44 loc) · 1.3 KB
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 Check"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Set Up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.2'
channel: 'stable'
cache: true
- name: Configure Flutter minSdkVersion
run: |
set -euo pipefail
mkdir -p android
touch android/local.properties
if grep -qE '^flutter\.minSdkVersion=' android/local.properties; then
sed -i 's/^flutter\.minSdkVersion=.*/flutter.minSdkVersion=23/' android/local.properties
else
echo "flutter.minSdkVersion=23" >> android/local.properties
fi
- name: Install Dependencies
run: flutter pub get
- name: Generate localization and other required files
run: dart run build_runner build -d
- name: Analyze
run: flutter analyze
- name: Run tests
run: flutter test
- name: Build APK (debug check)
run: flutter build apk --debug