Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ on:
required: false
type: string
default: "main"
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:
version_tag:
value: ${{ jobs.tag_release.outputs.version_tag }}
Expand Down Expand Up @@ -231,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: |
Expand Down Expand Up @@ -286,6 +301,7 @@ jobs:
TAG_FORMAT: ${{ inputs.tag_format }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
MAIN_BRANCH: ${{ inputs.main_branch }}
EXTRA_ASSET: ${{ inputs.extra_artifact_name }}

- name: Create semantic release tag
if: ${{ !inputs.dry_run }}
Expand All @@ -295,6 +311,7 @@ jobs:
PUBLISH_PACKAGE: ${{ inputs.publish_package }}
TAG_FORMAT: ${{ inputs.tag_format }}
MAIN_BRANCH: ${{ inputs.main_branch }}
EXTRA_ASSET: ${{ inputs.extra_artifact_name }}
run: |
npx semantic-release --tag-format "${TAG_FORMAT}"

Expand Down
8 changes: 7 additions & 1 deletion release.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down