File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' v*.*' # Matches tags like v1.300, etc.
7+ workflow_dispatch :
8+ inputs :
9+ version :
10+ description : ' Version for testing (e.g., "test-1.4" or "dev-2024-01-01")'
11+ required : true
12+ default : ' test-1.4'
13+ type : string
714
815permissions :
916 contents : write # Required to create releases and upload assets
@@ -18,12 +25,19 @@ jobs:
1825 with :
1926 fetch-depth : 0 # Full history for proper release notes
2027
21- - name : Extract version from tag
28+ - name : Extract version from tag or input
2229 id : version
2330 run : |
24- VERSION=${GITHUB_REF#refs/tags/v}
25- echo "version=${VERSION}" >> $GITHUB_OUTPUT
26- echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
31+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
32+ VERSION="${{ github.event.inputs.version }}"
33+ TAG="v${VERSION}"
34+ echo "version=${VERSION}" >> $GITHUB_OUTPUT
35+ echo "tag=${TAG}" >> $GITHUB_OUTPUT
36+ else
37+ VERSION=${GITHUB_REF#refs/tags/v}
38+ echo "version=${VERSION}" >> $GITHUB_OUTPUT
39+ echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
40+ fi
2741
2842 - name : Prepare release artifacts
2943 run : |
You can’t perform that action at this time.
0 commit comments