File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 echo "version=${VERSION}" >> $GITHUB_OUTPUT
5959 echo "release_name=${VERSION#v}" >> $GITHUB_OUTPUT
6060
61- - name : Release - Checkout tag for workflow_dispatch
61+ - name : Release - Checkout or create tag for workflow_dispatch
6262 if : github.event_name == 'workflow_dispatch'
6363 run : |
6464 # For workflow_dispatch, we need to checkout the specific tag
6767 echo "Checking out existing tag: ${TAG}"
6868 git checkout "refs/tags/${TAG}"
6969 else
70- echo "::error::Tag '${TAG}' does not exist. Create the tag first before running this workflow."
71- exit 1
70+ echo "Tag '${TAG}' does not exist. Creating it now..."
71+ CURRENT_SHA=$(git rev-parse HEAD)
72+ git tag "${TAG}" "${CURRENT_SHA}"
73+ git push origin "${TAG}"
74+ echo "✅ Created and pushed tag: ${TAG} at commit ${CURRENT_SHA:0:8}"
7275 fi
7376
7477 - name : Release - Verify checkout matches expected version
You can’t perform that action at this time.
0 commit comments