-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 839 Bytes
/
ci.yaml
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
name: CI
on:
pull_request:
branches:
[ main ]
push:
branches:
[ release ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.5'
- name: Check out code
uses: actions/checkout@v2
- name: Get dependencies
run: flutter pub get
- name: Analyze code
run: flutter analyze
- name: Test code
run: flutter test
- name: Build APK
if: github.ref == 'refs/heads/release'
run: flutter build apk --release
- name: Upload APK
if: github.ref == 'refs/heads/release'
uses: actions/upload-artifact@v2
with:
name: App Release
path: build/app/outputs/flutter-apk/app-release.apk