-
Notifications
You must be signed in to change notification settings - Fork 94
50 lines (39 loc) · 1.2 KB
/
flutterci.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
name: Flutter CI
on:
push:
branches:
- main
- reports
pull_request:
branches:
- main
- reports
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- uses: actions/checkout@v2
# Step 2: Setup Java with version 12.x
- uses: actions/setup-java@v1
with:
java-version: '12.x'
# Step 3: Setup Flutter with version 3.7.11
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.22.1'
# Step 4: Get dependencies using pub get
- run: flutter pub get
# Step 5: Analyze the code using flutter analyze
- run: flutter analyze
# Step 6: Format the code using flutter format (uncomment if needed)
# - run: flutter format -n --set-exit-if-changed .
# Step 7: Run tests using flutter test
- run: flutter test
# Step 8: Build APK using flutter build apk
- run: flutter build apk
# Step 9: Upload the built APK as an artifact
- uses: actions/upload-artifact@v1
with:
name: release-apk
path: build/app/outputs/apk/release/app-release.apk