File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Flutter Integration Test
22
33on :
4- pull_request :
5- branches : [ main ]
64 push :
7- branches : [ main ]
85
96jobs :
107 integration :
11- runs-on : macos-latest
12-
8+ runs-on : ubuntu-latest
139 steps :
14- - uses : actions/checkout@v4
15-
16- - name : Set up Flutter
17- uses : subosito/flutter-action@v2
18- with :
19- flutter-version : ' stable'
20-
21- - name : Run Flutter doctor
22- run : flutter doctor -v
23-
24- - name : Test Flutter integration
25- run : |
26- cd example
27- flutter pub get
28- flutter test integration_test
10+ - uses : actions/checkout@v4
11+ - name : Set up Flutter
12+ uses : subosito/flutter-action@v2
13+ with :
14+ channel : stable
15+ flutter-version-file : pubspec.yaml
16+ - name : Flutter integration test
17+ working-directory : ./example
18+ run : flutter test integration_test
Original file line number Diff line number Diff line change 11name : Publish Flutter Plugin
22
33on :
4- push :
5- tags :
6- - ' v*'
4+ workflow_run :
5+ workflows :
6+ - " Code Quality"
7+ - " Flutter Integration Test"
8+ types :
9+ - completed
710
811jobs :
912 publish :
13+ if : startsWith(github.event.workflow_run.head_ref, 'refs/tags/v')
1014 runs-on : ubuntu-latest
1115 steps :
1216 - name : Checkout code
1317 uses : actions/checkout@v4
1418 with :
1519 fetch-depth : 0
16-
1720 - name : Set up Flutter
1821 uses : subosito/flutter-action@v2
1922 with :
20- flutter-version : ' 3.16.0 ' # or specify latest stable
21-
23+ channel : stable
24+ flutter-version-file : pubspec.yaml
2225 - name : Install dependencies
2326 run : flutter pub get
24-
2527 - name : Analyze code
2628 run : flutter analyze
27-
2829 - name : Format code
2930 run : dart format --output=none --set-exit-if-changed .
30-
3131 - name : Update version
3232 run : |
3333 LATEST_TAG=$(git describe --tags --abbrev=0)
@@ -38,12 +38,10 @@ jobs:
3838 git add pubspec.yaml
3939 git commit -m "chore: update version to $VERSION"
4040 git push
41-
4241 - name : Run tests
4342 run : flutter test
44-
4543 - name : Publish plugin
4644 run : flutter pub publish --force
4745 env :
4846 PUB_HOSTED_URL : https://pub.dartlang.org
49- PUB_TOKEN : ${{ secrets.PUB_TOKEN }}
47+ PUB_TOKEN : ${{ secrets.PUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Code Quality
2+
3+ on :
4+ push :
5+
6+ jobs :
7+ integration :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v4
11+ - name : Set up Flutter
12+ uses : subosito/flutter-action@v2
13+ with :
14+ channel : stable
15+ flutter-version-file : pubspec.yaml
16+ - name : Install dependencies
17+ run : flutter pub get
18+ - name : Analyze code
19+ run : flutter analyze
20+ - name : Format code
21+ run : dart format --output=none --set-exit-if-changed .
You can’t perform that action at this time.
0 commit comments