Skip to content

Commit 50a63f6

Browse files
authored
Merge branch 'main' into aea-0000-parallel-cf
2 parents 26a3c37 + ba86b0c commit 50a63f6

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

.github/workflows/tag-release.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
asdfVersion:
1515
type: string
1616
required: false
17-
default: "v0.18.0"
17+
default: "0.18.0"
1818
publish_package:
1919
description: "Whether to publish a package to an npm registry"
2020
required: true
@@ -23,12 +23,28 @@ on:
2323
description: "The tag format to use for the release tags"
2424
required: false
2525
type: string
26-
default: "v\\${version}"
26+
default: "v${version}"
2727
main_branch:
2828
description: "The main branch name for releases"
2929
required: false
3030
type: string
3131
default: "main"
32+
extra_artifact_name:
33+
description: "An extra artifact to include in the release"
34+
required: false
35+
type: string
36+
extra_artifact_id:
37+
description: "An id for the extra artifact"
38+
required: false
39+
type: string
40+
extra_artifact_run_id:
41+
description: "An run id for the extra artifact"
42+
required: false
43+
type: string
44+
extra_artifact_repository:
45+
description: "An repository for the extra artifact"
46+
required: false
47+
type: string
3248
outputs:
3349
version_tag:
3450
value: ${{ jobs.tag_release.outputs.version_tag }}
@@ -231,6 +247,15 @@ jobs:
231247
make install
232248
make build
233249
250+
- name: Download extra artifact
251+
if: ${{ inputs.extra_artifact_name != '' }}
252+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
253+
with:
254+
artifact-ids: ${{ inputs.extra_artifact_id }}
255+
github-token: ${{ secrets.GITHUB_TOKEN }}
256+
repository: ${{ inputs.extra_artifact_repository }}
257+
run-id: ${{ inputs.extra_artifact_run_id }}
258+
234259
- name: Set VERSION_TAG based on dry_run flag
235260
id: output_version_tag
236261
run: |
@@ -286,6 +311,7 @@ jobs:
286311
TAG_FORMAT: ${{ inputs.tag_format }}
287312
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
288313
MAIN_BRANCH: ${{ inputs.main_branch }}
314+
EXTRA_ASSET: ${{ inputs.extra_artifact_name }}
289315

290316
- name: Create semantic release tag
291317
if: ${{ !inputs.dry_run }}
@@ -295,6 +321,7 @@ jobs:
295321
PUBLISH_PACKAGE: ${{ inputs.publish_package }}
296322
TAG_FORMAT: ${{ inputs.tag_format }}
297323
MAIN_BRANCH: ${{ inputs.main_branch }}
324+
EXTRA_ASSET: ${{ inputs.extra_artifact_name }}
298325
run: |
299326
npx semantic-release --tag-format "${TAG_FORMAT}"
300327

release.config.cjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ module.exports = {
7575
{
7676
path: "CHANGELOG.md",
7777
label: "CHANGELOG.md"
78-
}
78+
},
79+
...(process.env.EXTRA_ASSET ? [
80+
{
81+
path: process.env.EXTRA_ASSET,
82+
label: process.env.EXTRA_ASSET
83+
}
84+
] : [])
7985
],
8086
successComment: false,
8187
failComment: false,

0 commit comments

Comments
 (0)