Skip to content

Commit d91ef3a

Browse files
committed
Update release-and-deploy.yml
1 parent 0bef0de commit d91ef3a

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/release-and-deploy.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,14 @@ jobs:
142142
run: |
143143
if [[ "${{ github.event.inputs.deploy_only }}" == "true" ]]; then
144144
DEPLOY_TAG="${{ github.event.inputs.deploy_tag }}"
145-
# Ensure deploy_tag starts with 'v' if provided for deploy_only
146-
if [[ ! "$DEPLOY_TAG" =~ ^v ]]; then
147-
echo "::warning::Deploy tag '${DEPLOY_TAG}' does not start with 'v'. Prepending 'v'."
148-
DEPLOY_TAG="v${DEPLOY_TAG}"
149-
fi
150145
else
151146
DEPLOY_TAG="v${{ needs.prepare-release.outputs.version }}"
152147
fi
153148
154-
# Validate tag format (vX.Y.Z)
155-
if [[ ! "$DEPLOY_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([-.].+)?$ ]]; then
156-
echo "::error::Invalid tag format: '$DEPLOY_TAG'. Expected format: vX.Y.Z or vX.Y.Z-suffix"
157-
exit 1
149+
# Accept both 'vX.Y.Z' and 'X.Y.Z' tag formats
150+
if [[ ! "$DEPLOY_TAG" =~ ^(v)?[0-9]+\.[0-9]+\.[0-9]+([-.].+)?$ ]]; then
151+
echo "::error::Invalid tag format: '$DEPLOY_TAG'. Expected format: X.Y.Z, vX.Y.Z, X.Y.Z-suffix, or vX.Y.Z-suffix"
152+
exit 1
158153
fi
159154
160155
# Extract version number without 'v'

0 commit comments

Comments
 (0)