Skip to content

Commit 8e05a6a

Browse files
authored
Merge pull request #269 from wp-graphql/fix-wp-org-deploy
ci: Update release-and-deploy.yml
2 parents 6727b1a + 40b2e4f commit 8e05a6a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.changeset/eighty-rivers-cheat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wpgraphql-ide": patch
3+
---
4+
5+
test10

.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)