-
-
Notifications
You must be signed in to change notification settings - Fork 23
75 lines (63 loc) · 1.73 KB
/
Copy pathandroid.yml
File metadata and controls
75 lines (63 loc) · 1.73 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build Android
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
android: ${{ steps.filter.outputs.android }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
android:
- 'android/**'
- 'assets/**'
- 'lib/**'
- 'pubspec.yaml'
Android:
needs: changes
if: ${{ needs.changes.outputs.android == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Cache Pub Packages
uses: actions/cache@v3
with:
path: ~/.pub-cache
key: ubuntu-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
ubuntu-pub-
- name: Cache build_runner (Optional)
uses: actions/cache@v3
with:
path: .dart_tool/build
key: ubuntu-build-runner-${{ hashFiles('**/*.dart') }}
restore-keys: |
ubuntu-build-runner-
- name: Install dependencies
run: flutter pub get
- name: Prebuild with build_runner
run: dart run build_runner build --delete-conflicting-outputs
- name: Build apk
run: |
flutter build apk --debug
# flutter build aab --debug
- name: Upload (apk) Artifacts
uses: actions/upload-artifact@main
with:
name: "DPIP.apk"
path: build/app/outputs/flutter-apk/*.apk
- name: Upload (aab) Artifacts
uses: actions/upload-artifact@main
with:
name: "DPIP.aab"
path: build/app/outputs/bundle/release/*.aab