9898 default : ' '
9999 required : false
100100 type : string
101+ tag-prefix :
102+ description : >-
103+ The prefix to expect and generate for release git tags (e.g. 'v' or '').
104+ default : " v"
105+ required : false
106+ type : string
101107 local_debug :
102108 description : Whether to use a local copy of package:firehose - only for debug
103109 default : false
@@ -140,7 +146,9 @@ jobs:
140146
141147 - name : Install firehose (internal)
142148 if : ${{ !inputs.local_debug && github.repository == 'dart-lang/ecosystem' }}
143- run : dart pub global activate --source git https://github.com/dart-lang/ecosystem --git-path pkgs/firehose/ --git-ref ${{ github.head_ref || github.ref_name }}
149+ env :
150+ GIT_REF : ${{ github.head_ref || github.ref_name }}
151+ run : dart pub global activate --source git https://github.com/dart-lang/ecosystem --git-path pkgs/firehose/ --git-ref "$GIT_REF"
144152
145153 - name : Install firehose (external)
146154 if : ${{ !inputs.local_debug && github.repository != 'dart-lang/ecosystem' }}
@@ -169,11 +177,19 @@ jobs:
169177 ISSUE_NUMBER : ${{ github.event.number }}
170178 PR_LABELS : ${{ steps.fetch-labels.outputs.labels }}
171179 INPUTS_IGNORE_PACKAGES : ${{ inputs.ignore-packages }}
180+ INPUTS_TAG_PREFIX : ${{ inputs.tag-prefix }}
181+ USE_FLUTTER : ${{ inputs.use-flutter }}
172182 run : |
183+ if [ "$USE_FLUTTER" = "true" ]; then
184+ FLUTTER_FLAG="--use-flutter"
185+ else
186+ FLUTTER_FLAG="--no-use-flutter"
187+ fi
173188 dart pub global run firehose \
174189 --validate \
175- ${{ fromJSON('{"true":"--use-flutter","false":"--no-use-flutter"}')[inputs.use-flutter] }} \
176- --ignore-packages "${INPUTS_IGNORE_PACKAGES}"
190+ "$FLUTTER_FLAG" \
191+ --ignore-packages "$INPUTS_IGNORE_PACKAGES" \
192+ --tag-prefix "$INPUTS_TAG_PREFIX"
177193
178194 - name : Get comment id
179195 id : comment-id
@@ -188,18 +204,22 @@ jobs:
188204 continue-on-error : true
189205 env :
190206 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
191- run : dart pub global run firehose:comment create-or-update --issue ${{ github.event.number }} --body-path output/comment.md
207+ ISSUE_NUMBER : ${{ github.event.number }}
208+ run : dart pub global run firehose:comment create-or-update --issue "$ISSUE_NUMBER" --body-path output/comment.md
192209
193210 - name : Update comment
194211 if : ${{ (hashFiles('output/comment.md') != '') && inputs.write-comments && (steps.comment-id.outputs.comment != '') }}
195212 env :
196213 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
197- run : dart pub global run firehose:comment create-or-update --comment-id ${{ steps.comment-id.outputs.comment }} --body-path output/comment.md
214+ COMMENT_ID : ${{ steps.comment-id.outputs.comment }}
215+ run : dart pub global run firehose:comment create-or-update --comment-id "$COMMENT_ID" --body-path output/comment.md
198216
199217 - name : Save PR number
200218 if : ${{ !inputs.write-comments }}
219+ env :
220+ ISSUE_NUMBER : ${{ github.event.number }}
201221 run : |
202- mkdir -p output/ && echo ${{ github.event.number }} > output/issueNumber
222+ mkdir -p output/ && echo "$ISSUE_NUMBER" > output/issueNumber
203223
204224 - name : Upload folder with number and markdown
205225 if : ${{ !inputs.write-comments }}
@@ -244,7 +264,9 @@ jobs:
244264
245265 - name : Install firehose (internal)
246266 if : ${{ !inputs.local_debug && github.repository == 'dart-lang/ecosystem' }}
247- run : dart pub global activate --source git https://github.com/dart-lang/ecosystem --git-path pkgs/firehose/ --git-ref ${{ github.head_ref || github.ref_name }}
267+ env :
268+ GIT_REF : ${{ github.head_ref || github.ref_name }}
269+ run : dart pub global activate --source git https://github.com/dart-lang/ecosystem --git-path pkgs/firehose/ --git-ref "$GIT_REF"
248270
249271 - name : Install firehose (external)
250272 if : ${{ !inputs.local_debug && github.repository != 'dart-lang/ecosystem' }}
@@ -255,4 +277,16 @@ jobs:
255277 if : ${{ inputs.local_debug }}
256278
257279 - name : Publish packages
258- run : dart pub global run firehose --publish ${{ fromJSON('{"true":"--use-flutter","false":"--no-use-flutter"}')[inputs.use-flutter] }}
280+ env :
281+ INPUTS_TAG_PREFIX : ${{ inputs.tag-prefix }}
282+ USE_FLUTTER : ${{ inputs.use-flutter }}
283+ run : |
284+ if [ "$USE_FLUTTER" = "true" ]; then
285+ FLUTTER_FLAG="--use-flutter"
286+ else
287+ FLUTTER_FLAG="--no-use-flutter"
288+ fi
289+ dart pub global run firehose \
290+ --publish \
291+ "$FLUTTER_FLAG" \
292+ --tag-prefix "$INPUTS_TAG_PREFIX"
0 commit comments