44 tags :
55 - " dart-[0-9]+.[0-9]+.[0-9]+*"
66 - " flutter-[0-9]+.[0-9]+.[0-9]+*"
7- workflow_call :
8- inputs :
9- dart_tag :
10- required : false
11- type : string
12- description : ' Dart package version tag (dart-#.#.#)'
13- flutter_tag :
14- required : false
15- type : string
16- description : ' Flutter package version tag (flutter-#.#.#)'
177env :
18- # For tag push: extract from github.ref_name
19- # For workflow_call: use inputs
208 package : ${{ startsWith(github.ref_name, 'dart-') && 'dart' || startsWith(github.ref_name, 'flutter-') && 'flutter' || '' }}
21- dart_tag_resolved : ${{ inputs.dart_tag || (startsWith(github.ref_name, 'dart-') && github.ref_name || '') }}
22- flutter_tag_resolved : ${{ inputs.flutter_tag || (startsWith(github.ref_name, 'flutter-') && github.ref_name || '') }}
239jobs :
2410 pub-publish-dart :
25- if : inputs.dart_tag != '' || startsWith(github.ref_name, 'dart-')
11+ if : startsWith(github.ref_name, 'dart-')
2612 runs-on : ubuntu-latest
2713 timeout-minutes : 10
2814 permissions :
3117 - name : Checkout code
3218 uses : actions/checkout@v4
3319 with :
34- ref : ${{ env.dart_tag_resolved }}
20+ ref : ${{ github.ref_name }}
3521 - name : Setup dart
3622 uses : dart-lang/setup-dart@v1
3723 with :
5036 run : dart pub publish --force
5137
5238 pub-publish-flutter :
53- if : inputs.flutter_tag != '' || startsWith(github.ref_name, 'flutter-')
39+ if : startsWith(github.ref_name, 'flutter-')
5440 runs-on : ubuntu-latest
5541 timeout-minutes : 10
5642 permissions :
5945 - name : Checkout code
6046 uses : actions/checkout@v4
6147 with :
62- ref : ${{ env.flutter_tag_resolved }}
48+ ref : ${{ github.ref_name }}
6349 - name : Setup dart
6450 uses : dart-lang/setup-dart@v1
6551 with :
@@ -86,15 +72,15 @@ jobs:
8672 run : dart pub publish --force
8773
8874 docs-publish-dart :
89- if : inputs.dart_tag != '' || startsWith(github.ref_name, 'dart-')
75+ if : startsWith(github.ref_name, 'dart-')
9076 needs : pub-publish-dart
9177 runs-on : ubuntu-latest
9278 timeout-minutes : 15
9379 steps :
9480 - name : Checkout code
9581 uses : actions/checkout@v4
9682 with :
97- ref : ${{ env.dart_tag_resolved }}
83+ ref : ${{ github.ref_name }}
9884 - name : Setup dart
9985 uses : dart-lang/setup-dart@v1
10086 - name : Install dart dependencies
@@ -109,15 +95,15 @@ jobs:
10995 destination_dir : dart
11096
11197 docs-publish-flutter :
112- if : inputs.flutter_tag != '' || startsWith(github.ref_name, 'flutter-')
98+ if : startsWith(github.ref_name, 'flutter-')
11399 needs : pub-publish-flutter
114100 runs-on : ubuntu-latest
115101 timeout-minutes : 15
116102 steps :
117103 - name : Checkout code
118104 uses : actions/checkout@v4
119105 with :
120- ref : ${{ env.flutter_tag_resolved }}
106+ ref : ${{ github.ref_name }}
121107 - name : Setup dart
122108 uses : dart-lang/setup-dart@v1
123109 - name : Setup flutter
0 commit comments