File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,3 +108,20 @@ jobs:
108108 - name : Run tests
109109 run : dart test --reporter=expanded test/*.dart
110110 working-directory : ${{ inputs.path }}
111+
112+ publish :
113+ runs-on : ubuntu-latest
114+ # Needs dart or flutter job to complete successfully, only skipped if either is failed, but not skipped
115+ needs : [test, analyze, format]
116+ if : ${{ github.event_name == 'release' && github.event.action == 'published' || github.ref == 'refs/heads/main' }}
117+ steps :
118+ - uses : actions/checkout@v5
119+ - uses : dart-lang/setup-dart@v1
120+ with :
121+ sdk : stable
122+
123+ - name : " Get dependencies"
124+ run : dart pub get
125+
126+ - name : Publish to pub.dev (dry run)
127+ run : dart pub publish --dry-run
Original file line number Diff line number Diff line change 7070 - name : " dart format"
7171 run : |
7272 echo "Checking Dart formatting...\nFiles displayed below:"
73- dart format --set-exit-if-changed .
73+ dart format -o none --set-exit-if-changed ./lib/
74+ if [ -d "${{ inputs.path }}/test" ]; then dart format -o none --set-exit-if-changed ./test/; fi
7475 echo "No formatting issues found."
7576 working-directory : ${{ inputs.path }}
7677
@@ -113,3 +114,21 @@ jobs:
113114 - name : Run tests
114115 run : flutter test --reporter=expanded test/*.dart
115116 working-directory : ${{ inputs.path }}
117+
118+ publish :
119+ runs-on : ubuntu-latest
120+ # Needs dart or flutter job to complete successfully, only skipped if either is failed, but not skipped
121+ needs : [test, analyze, format]
122+ if : ${{ github.event_name == 'release' && github.event.action == 'published' || github.ref == 'refs/heads/main' }}
123+ steps :
124+ - uses : actions/checkout@v5
125+ - uses : subosito/flutter-action@v2
126+ with :
127+ channel : stable
128+ cache : true
129+
130+ - name : " Get dependencies"
131+ run : flutter pub get
132+
133+ - name : Publish to pub.dev (dry run)
134+ run : flutter pub publish --dry-run
Original file line number Diff line number Diff line change 3838 uses : ./.github/workflows/_base-flutter.yaml
3939 with :
4040 path : ' .'
41-
42- publish :
43- runs-on : ubuntu-latest
44- # Needs dart or flutter job to complete successfully, only skipped if either is failed, but not skipped
45- needs : [dart, flutter]
46- if : ${{ always() && (needs.dart.result == 'success' || needs.flutter.result == 'success') && (needs.dart.result != 'failure' && needs.flutter.result != 'failure') && (github.event_name == 'release' && github.event.action == 'published' || github.ref == 'refs/heads/main') }}
47- steps :
48- - uses : actions/checkout@v5
49- - uses : dart-lang/setup-dart@v1
50- with :
51- sdk : stable
52-
53- - name : " Get dependencies"
54- run : dart pub get
55-
56- - name : Publish to pub.dev (dry run)
57- run : dart pub publish --dry-run
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ dev_dependencies:
4848 # activated in the `analysis_options.yaml` file located at the root of your
4949 # package. See that file for information about deactivating specific lint
5050 # rules and activating additional ones.
51- flutter_lints : ^5 .0.0
51+ flutter_lints : ^6 .0.0
5252
5353# For information on the generic Dart part of this file, see the
5454# following page: https://dart.dev/tools/pub/pubspec
You can’t perform that action at this time.
0 commit comments