From 3b859ef4e91188e972a10b2792e084f0ab2bbbdb Mon Sep 17 00:00:00 2001 From: Anthony Brown Date: Thu, 20 Nov 2025 14:31:00 +0000 Subject: [PATCH 1/3] add extra asset --- release.config.cjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/release.config.cjs b/release.config.cjs index 10e9092..01b1935 100644 --- a/release.config.cjs +++ b/release.config.cjs @@ -75,7 +75,13 @@ module.exports = { { path: "CHANGELOG.md", label: "CHANGELOG.md" - } + }, + ...(process.env.EXTRA_ASSET ? [ + { + path: process.env.EXTRA_ASSET, + label: process.env.EXTRA_ASSET + } + ] : []) ], successComment: false, failComment: false, From 67682eb3818b9209fdb86b95a47fc7adefc321b0 Mon Sep 17 00:00:00 2001 From: Anthony Brown Date: Thu, 20 Nov 2025 14:32:36 +0000 Subject: [PATCH 2/3] add it to workflow --- .github/workflows/tag-release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index c17aa5c..8e09e88 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -29,6 +29,10 @@ on: required: false type: string default: "main" + extra_asset: + description: "An extra asset to include in the release" + required: false + type: string outputs: version_tag: value: ${{ jobs.tag_release.outputs.version_tag }} @@ -286,6 +290,7 @@ jobs: TAG_FORMAT: ${{ inputs.tag_format }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} MAIN_BRANCH: ${{ inputs.main_branch }} + EXTRA_ASSET: ${{ inputs.extra_asset }} - name: Create semantic release tag if: ${{ !inputs.dry_run }} @@ -295,6 +300,7 @@ jobs: PUBLISH_PACKAGE: ${{ inputs.publish_package }} TAG_FORMAT: ${{ inputs.tag_format }} MAIN_BRANCH: ${{ inputs.main_branch }} + EXTRA_ASSET: ${{ inputs.extra_asset }} run: | npx semantic-release --tag-format "${TAG_FORMAT}" From 081ffda16434d30b3b77efa94b72423966ab95e1 Mon Sep 17 00:00:00 2001 From: Anthony Brown Date: Thu, 20 Nov 2025 14:57:35 +0000 Subject: [PATCH 3/3] download the asset --- .github/workflows/tag-release.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index 8e09e88..8a897be 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -29,8 +29,12 @@ on: required: false type: string default: "main" - extra_asset: - description: "An extra asset to include in the release" + extra_artifact_name: + description: "An extra artifact to include in the release" + required: false + type: string + extra_artifact_url: + description: "An url to download the extra artifact to include in the release" required: false type: string outputs: @@ -235,6 +239,13 @@ jobs: make install make build + - name: Download extra artifact + if: ${{ inputs.extra_artifact_url != '' }} + run: | + curl -L -o "${EXTRA_ASSET}" "${EXTRA_ASSET_URL}" + env: + EXTRA_ASSET: ${{ inputs.extra_artifact_name }} + EXTRA_ASSET_URL: ${{ inputs.extra_artifact_url }} - name: Set VERSION_TAG based on dry_run flag id: output_version_tag run: | @@ -290,7 +301,7 @@ jobs: TAG_FORMAT: ${{ inputs.tag_format }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} MAIN_BRANCH: ${{ inputs.main_branch }} - EXTRA_ASSET: ${{ inputs.extra_asset }} + EXTRA_ASSET: ${{ inputs.extra_artifact_name }} - name: Create semantic release tag if: ${{ !inputs.dry_run }} @@ -300,7 +311,7 @@ jobs: PUBLISH_PACKAGE: ${{ inputs.publish_package }} TAG_FORMAT: ${{ inputs.tag_format }} MAIN_BRANCH: ${{ inputs.main_branch }} - EXTRA_ASSET: ${{ inputs.extra_asset }} + EXTRA_ASSET: ${{ inputs.extra_artifact_name }} run: | npx semantic-release --tag-format "${TAG_FORMAT}"