File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 - cron : " 0 0 * * *"
1313 # Manual trigger for testing purposes
1414 workflow_dispatch :
15+ inputs :
16+ version_level :
17+ description : " Version level for the pre-release bump when the previous release is stable (e.g. premajor → v3.0.0-0)"
18+ required : false
19+ default : " preminor"
20+ type : choice
21+ options :
22+ - prepatch
23+ - preminor
24+ - premajor
1525
1626permissions :
1727 contents : write
6070 Write-Host "[INFO] Previous tag is a prerelease -> using 'prerelease' to increment suffix" -ForegroundColor Cyan
6171 } else {
6272 # Previous tag is stable -> create first prerelease (e.g., v2.9.0 -> v2.10.0-0)
63- $RELEASE_TYPE = "preminor"
64- Write-Host "[INFO] Previous tag is stable -> using 'preminor' to create first prerelease" -ForegroundColor Cyan
73+ # For manual dispatch, honour the version_level input; fall back to 'preminor' for scheduled runs
74+ if ("${{ github.event_name }}" -eq "workflow_dispatch") {
75+ $RELEASE_TYPE = "${{ inputs.version_level }}"
76+ Write-Host "[INFO] Previous tag is stable -> using user-selected '$RELEASE_TYPE' to create first prerelease" -ForegroundColor Cyan
77+ } else {
78+ $RELEASE_TYPE = "preminor"
79+ Write-Host "[INFO] Previous tag is stable -> using 'preminor' to create first prerelease" -ForegroundColor Cyan
80+ }
6581 }
6682
6783 # Manual trigger always builds
You can’t perform that action at this time.
0 commit comments