@@ -3,6 +3,8 @@ name: Base
3
3
on :
4
4
push :
5
5
branches : [main]
6
+ tags :
7
+ - ' *'
6
8
7
9
pull_request :
8
10
branches : [main]
12
14
jobs :
13
15
build :
14
16
runs-on : macos-latest
17
+ strategy :
18
+ fail-fast : false
19
+ matrix :
20
+ channel : [stable, beta]
15
21
16
22
steps :
17
23
- uses : actions/checkout@v3
24
30
- name : Flutter action
25
31
uses : subosito/flutter-action@v2
26
32
with :
27
- channel : ' stable'
28
- flutter-version : ' 2.10.5'
33
+ channel : ${{ matrix.channel }}
29
34
30
35
- name : Install dependencies
31
36
run : flutter pub get
35
40
run : flutter analyze
36
41
# - name: Run tests
37
42
# run: flutter test
43
+ - name : Check publish warnings
44
+ run : dart pub publish --dry-run
38
45
- name : Build example
39
46
run : |
40
47
cd example
41
48
flutter build appbundle --debug
42
49
flutter build ios --debug --no-codesign
43
50
flutter build web
51
+
52
+ - name : Upload coverage to Codecov
53
+ if : ${{ matrix.channel == 'stable' }}
54
+ uses : codecov/codecov-action@v3
55
+ with :
56
+ files : coverage/lcov.info
57
+ flags : unittests
58
+ name : flutter_form_builder
59
+
60
+ deployment :
61
+ if : ${{ github.ref_type == 'tag' }}
62
+ needs : build
63
+ name : Deploy package
64
+ runs-on : ubuntu-latest
65
+
66
+ steps :
67
+ - name : Configure enviroment
68
+ uses : actions/checkout@v3
69
+ - name : Download flutter
70
+ uses : subosito/flutter-action@v2
71
+ with :
72
+ channel : ' stable'
73
+ - name : Setup pub credentials
74
+ shell : bash
75
+ env :
76
+ PUB_DEV_PUBLISH_ACCESS_TOKEN : ${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}
77
+ PUB_DEV_PUBLISH_REFRESH_TOKEN : ${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}
78
+ run : |
79
+ sh ./tool/pub_login.sh
80
+ - name : Publish package
81
+ run : dart pub publish -v -f
0 commit comments