Skip to content

Commit 10893b7

Browse files
committed
update
1 parent 32b9795 commit 10893b7

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Version tag (e.g. v0.1.0)'
11+
required: true
712

813
jobs:
914
release:
@@ -31,7 +36,12 @@ jobs:
3136
- name: Get version from tag
3237
id: version
3338
shell: bash
34-
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
39+
run: |
40+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
41+
echo "VERSION=${{ github.event.inputs.tag }}" | sed 's/^v//' >> $GITHUB_OUTPUT
42+
else
43+
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
44+
fi
3545
3646
- name: Stage release artifacts
3747
shell: pwsh

0 commit comments

Comments
 (0)