Skip to content

Commit 081ffda

Browse files
committed
download the asset
1 parent 67682eb commit 081ffda

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/tag-release.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ on:
2929
required: false
3030
type: string
3131
default: "main"
32-
extra_asset:
33-
description: "An extra asset to include in the release"
32+
extra_artifact_name:
33+
description: "An extra artifact to include in the release"
34+
required: false
35+
type: string
36+
extra_artifact_url:
37+
description: "An url to download the extra artifact to include in the release"
3438
required: false
3539
type: string
3640
outputs:
@@ -235,6 +239,13 @@ jobs:
235239
make install
236240
make build
237241
242+
- name: Download extra artifact
243+
if: ${{ inputs.extra_artifact_url != '' }}
244+
run: |
245+
curl -L -o "${EXTRA_ASSET}" "${EXTRA_ASSET_URL}"
246+
env:
247+
EXTRA_ASSET: ${{ inputs.extra_artifact_name }}
248+
EXTRA_ASSET_URL: ${{ inputs.extra_artifact_url }}
238249
- name: Set VERSION_TAG based on dry_run flag
239250
id: output_version_tag
240251
run: |
@@ -290,7 +301,7 @@ jobs:
290301
TAG_FORMAT: ${{ inputs.tag_format }}
291302
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
292303
MAIN_BRANCH: ${{ inputs.main_branch }}
293-
EXTRA_ASSET: ${{ inputs.extra_asset }}
304+
EXTRA_ASSET: ${{ inputs.extra_artifact_name }}
294305

295306
- name: Create semantic release tag
296307
if: ${{ !inputs.dry_run }}
@@ -300,7 +311,7 @@ jobs:
300311
PUBLISH_PACKAGE: ${{ inputs.publish_package }}
301312
TAG_FORMAT: ${{ inputs.tag_format }}
302313
MAIN_BRANCH: ${{ inputs.main_branch }}
303-
EXTRA_ASSET: ${{ inputs.extra_asset }}
314+
EXTRA_ASSET: ${{ inputs.extra_artifact_name }}
304315
run: |
305316
npx semantic-release --tag-format "${TAG_FORMAT}"
306317

0 commit comments

Comments
 (0)