File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Android Build CI
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ branches : [ "main" ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout source code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Java
18+ uses : actions/setup-java@v4
19+ with :
20+ distribution : ' temurin'
21+ java-version : ' 17'
22+
23+ - name : Set up Flutter
24+ uses : subosito/flutter-action@v2
25+ with :
26+ channel : ' stable'
27+
28+ - name : Cache Flutter dependencies
29+ uses : actions/cache@v4
30+ with :
31+ path : |
32+ ~/.pub-cache
33+ key : ${{ runner.os }}-flutter-${{ hashFiles('myapp/pubspec.yaml') }}
34+ restore-keys : |
35+ ${{ runner.os }}-flutter-
36+
37+ - name : Install dependencies
38+ run : flutter pub get
39+ working-directory : myapp
40+
41+ - name : Analyze project source
42+ run : flutter analyze
43+ working-directory : myapp
44+
45+ - name : Run tests
46+ run : flutter test
47+ working-directory : myapp
48+
49+ - name : Build debug APK
50+ run : flutter build apk --debug
51+ working-directory : myapp
52+
53+ - name : Upload debug APK artifact
54+ uses : actions/upload-artifact@v4
55+ with :
56+ name : debug-apk
57+ path : myapp/build/app/outputs/flutter-apk/app-debug.apk
You can’t perform that action at this time.
0 commit comments