-
-
Notifications
You must be signed in to change notification settings - Fork 11
66 lines (64 loc) · 2.05 KB
/
ci.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
56
57
58
59
60
61
62
63
64
65
66
name: CI
on: push
jobs:
build:
name: "🏗 Build"
runs-on: ubuntu-latets
steps:
- name: "📥 Check-out"
uses: actions/checkout@v4
- name: "🧰 Install Java"
uses: actions/setup-java@v3
with:
java-version: "8"
- name: "🧰 Install Flutter"
uses: subosito/flutter-action@v2
with:
channel: "stable"
run: flutter --version
- name: "👤 Disable tracking"
run: flutter config --no-analytics
# - name: "🔑 Add secrets"
# shell: bash
# env:
# GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
# GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
# run: |
# cat <<EOT >> secrets.yaml
# google:
# clientId: "$GOOGLE_CLIENT_ID"
# clientSecret: "$GOOGLE_CLIENT_SECRET"
# EOT
- name: "🧰 Install dependencies"
run: flutter pub get
- name: "🏗 Build AOT Dart code"
run: flutter build aot
- name: "🏗 Build Android App Bundle"
run: flutter build appbundle
- name: "🏗 Build Android APK"
run: flutter build apk
- name: "✅ Analyze"
run: flutter analyze
- name: "✅ Test"
run: flutter test --coverage
- name: "📤 Upload test coverage report"
uses: actions/upload-artifact@v3
with:
name: "Test coverage report"
path: coverage/lcov.info
- name: "📤 Upload test coverage report to Codecov.io"
uses: codecov/codecov-action@v4
if: runner.os == 'Linux'
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coverage/lcov.info
- name: "📤 Upload Android App Bundle"
uses: actions/upload-artifact@v3
with:
name: "Android App Bundle"
path: build/app/outputs/bundle/release/app-release.aab
- name: "📤 Upload Android APK"
uses: actions/upload-artifact@v3
with:
name: "Android APK"
path: build/app/outputs/apk/release/app-release.apk