4
4
push :
5
5
branches : [main]
6
6
tags :
7
- - ' * '
7
+ - " [0-9]+.[0-9]+.[0-9]+* "
8
8
9
9
pull_request :
10
10
branches : [main]
14
14
jobs :
15
15
build :
16
16
runs-on : macos-latest
17
- strategy :
18
- fail-fast : false
19
- matrix :
20
- channel : [stable]
21
17
22
18
steps :
23
19
- uses : actions/checkout@v3
30
26
- name : Flutter action
31
27
uses : subosito/flutter-action@v2
32
28
with :
33
- channel : ${{ matrix.channel }}
29
+ channel : " stable "
34
30
35
31
- name : Install dependencies
36
32
run : flutter pub get
40
36
run : flutter analyze
41
37
- name : Run tests
42
38
run : flutter test --coverage
39
+ - name : Upload coverage to Codecov
40
+ uses : codecov/codecov-action@v3
41
+ with :
42
+ files : coverage/lcov.info
43
+ name : form_builder_extra_fields
43
44
- name : Check publish warnings
44
45
run : dart pub publish --dry-run
45
46
- name : Build example
@@ -49,42 +50,28 @@ jobs:
49
50
flutter build ios --debug --no-codesign
50
51
flutter build web
51
52
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 : form_builder_extra_fields
59
-
60
53
deployment :
61
54
if : ${{ github.ref_type == 'tag' }}
62
55
needs : build
63
56
name : Deploy package
57
+ permissions :
58
+ id-token : write
64
59
runs-on : ubuntu-latest
65
-
66
60
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
82
- - name : Build changelog
83
- id : github_release
84
- uses : mikepenz/release-changelog-builder-action@v3
85
- env :
86
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
87
- - name : Create release
88
-
89
- with :
90
- body : ${{steps.github_release.outputs.changelog}}
61
+ - uses : actions/checkout@v3
62
+ - uses : dart-lang/setup-dart@v1
63
+ - name : Flutter action
64
+ uses : subosito/flutter-action@v2
65
+ with :
66
+ channel : " stable"
67
+ - name : Publish package
68
+ run : dart pub publish -v -f
69
+ - name : Build changelog
70
+ id : github_release
71
+ uses : mikepenz/release-changelog-builder-action@v3
72
+ env :
73
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
74
+ - name : Create release
75
+ uses : softprops/action-gh-release@v1
76
+ with :
77
+ body : ${{steps.github_release.outputs.changelog}}
0 commit comments