File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 106106 Email of the git committer. Defaults to the GitHub Action bot's email.
107107 default : " 41898282+github-actions[bot]@users.noreply.github.com"
108108 type : string
109+ tag_prefix :
110+ description : |
111+ The prefix to remove from the tag name to calculate the version.
112+ For example, with prefix 'v' and tag 'v1.2.3', the version becomes '1.2.3'.
113+ With prefix 'bazel-v' and tag 'bazel-v1.2.3', the version becomes '1.2.3'.
114+ default : " v"
115+ type : string
109116 secrets :
110117 publish_token :
111118 required : true
@@ -135,12 +142,13 @@ jobs:
135142 path : bazel-central-registry
136143 persist-credentials : false
137144
138- # Get version from the tag, stripping any v- prefix
145+ # Get version from the tag, stripping the specified prefix
139146 - name : Write release version
140147 env :
141148 TAG : ${{ inputs.tag_name }}
149+ PREFIX : ${{ inputs.tag_prefix }}
142150 run : |
143- VERSION=${TAG#v }
151+ VERSION=${TAG#$PREFIX }
144152 echo Version: $VERSION
145153 echo "VERSION=$VERSION" >> $GITHUB_ENV
146154
You can’t perform that action at this time.
0 commit comments