2727 description : Continue existing prerelease (if available)
2828 default : false
2929
30+ specific_version :
31+ type : string
32+ description : Specify exact version (e.g., 3.3.0-alpha.1) - overrides other version settings
33+ required : false
34+
3035 is_dry_run :
3136 type : boolean
3237 description : Dry Run
33- default : false
3438
3539jobs :
3640 release-it :
4852 token : ${{ steps.generate-token.outputs.token }}
4953 fetch-depth : 0
5054
55+ - name : debug git tags
56+ run : |
57+ echo "All tags:"
58+ git tag -l
59+ echo "---"
60+ echo "Tags sorted by version:"
61+ git tag -l --sort=-v:refname
62+ echo "---"
63+ echo "Alpha tags sorted by version:"
64+ git tag -l "*-alpha*" --sort=-v:refname
65+ echo "---"
66+ echo "Tag details:"
67+ git for-each-ref --format="%(refname:short) %(objecttype) %(taggerdate)" refs/tags/
68+ echo "---"
69+ echo "Latest tag details:"
70+ LATEST_TAG=$(git describe --tags --abbrev=0)
71+ echo "Latest tag: $LATEST_TAG"
72+ git show $LATEST_TAG
73+
5174 - name : initialize mandatory git config
5275 run : |
5376 git config user.name "GitHub Release Bot"
@@ -60,10 +83,17 @@ jobs:
6083 run : |
6184 params=()
6285
86+ # Check if a specific version was provided
87+ if [[ -n "${{ github.event.inputs.specific_version }}" ]]; then
88+ params+=(--release=${{ github.event.inputs.specific_version }})
6389 # Determine prerelease logic
64- if [[ "${{ github.event.inputs.release_type }}" == "stable" ]]; then
90+ elif [[ "${{ github.event.inputs.release_type }}" == "stable" ]]; then
6591 params+=(--${{ github.event.inputs.version_bump }})
6692 elif [[ "${{ github.event.inputs.continue_prerelease }}" == "true" ]]; then
93+ # Add verbose logging to understand release-it's process
94+ params+=(--verbose)
95+ # Tell release-it to use prerelease tags
96+ params+=(--preReleaseId=${{ github.event.inputs.release_type }})
6797 params+=(--increment=prerelease)
6898 params+=(--preRelease=${{ github.event.inputs.release_type }})
6999 params+=(--plugins.@release-it/keep-a-changelog.keepUnreleased)
84114 echo "command: release-it ${params[@]}"
85115 release-it "${params[@]}"
86116 env :
87- GITHUB_TOKEN : ${{ steps.generate-token.outputs.token }}
117+ GITHUB_TOKEN : ${{ steps.generate-token.outputs.token }}
0 commit comments