File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ name: Release
33on :
44 push :
55 branches : ["main"]
6+ workflow_dispatch :
7+ inputs :
8+ version :
9+ description : ' Release version (e.g. 1.2.3)'
10+ required : true
11+ type : string
612
713concurrency :
814 group : release-${{ github.ref }}
2733 - name : Get version from Cargo.toml
2834 id : get_version
2935 run : |
30- # Use cargo metadata for robust version extraction
31- VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
32- echo "Detected version: $VERSION"
36+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
37+ VERSION="${{ github.event.inputs.version }}"
38+ echo "Using manually provided version: $VERSION"
39+ else
40+ VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
41+ echo "Detected version from Cargo.toml: $VERSION"
42+ fi
3343 echo "version=$VERSION" >> $GITHUB_OUTPUT
3444
3545 - name : Check if tag exists
You can’t perform that action at this time.
0 commit comments