Skip to content

Commit 5ab658b

Browse files
committed
Add manual tag dispatch to release assets workflow
1 parent 50d1952 commit 5ab658b

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/release-assets.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
types:
66
- published
77
- edited
8+
workflow_dispatch:
9+
inputs:
10+
tag:
11+
description: Release tag to build and upload (example: v2.0)
12+
required: true
813

914
permissions:
1015
contents: write
@@ -18,7 +23,11 @@ jobs:
1823
id: target
1924
shell: pwsh
2025
run: |
21-
$tag = "${{ github.event.release.tag_name }}"
26+
if ("${{ github.event_name }}" -eq "workflow_dispatch") {
27+
$tag = "${{ github.event.inputs.tag }}"
28+
} else {
29+
$tag = "${{ github.event.release.tag_name }}"
30+
}
2231
2332
if ([string]::IsNullOrWhiteSpace($tag)) {
2433
throw "No release tag was provided."

0 commit comments

Comments
 (0)