File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 33on :
44 release :
55 types : [ published ] # Trigger on published pre-releases and releases
6- workflow_dispatch :
6+ workflow_dispatch :
7+ inputs :
8+ tag :
9+ description : ' Tag to build (e.g., v4.2.0)'
10+ required : true
11+ type : string
712
813jobs :
914 variables :
1015 name : Set Variables
1116 runs-on : ubuntu-latest
1217 env :
13- TAG : ${{ github.event.release.tag_name }}
18+ TAG : ${{ github.event.release.tag_name || inputs.tag }}
1419 steps :
1520 - name : Extract semantic version from tag
1621 id : set_version
1722 run : |
23+ if [ -z "${TAG}" ]; then
24+ echo "Error: No release tag available. Please provide a tag when manually triggering the workflow."
25+ exit 1
26+ fi
27+ echo "Processing tag: ${TAG}"
1828 # Remove the "v" prefix if it exists and extract the semantic version number
1929 SEMANTIC_VERSION=$(echo "${TAG}" | grep -Po "(?<=^|[^0-9])([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-[a-zA-Z]+[0-9]*)?)")
2030 SEMANTIC_VERSION=${SEMANTIC_VERSION#"v"}
You can’t perform that action at this time.
0 commit comments