Skip to content

Commit e613a3e

Browse files
Bail build if no tag is found
1 parent 6c1213d commit e613a3e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ jobs:
4848
run: |
4949
# Get the latest tag (no longer using v prefix, filter out legacy v-prefixed tags)
5050
LATEST_TAG=$(git tag | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)
51+
52+
# Stop build if no version tag is found
53+
if [ -z "$LATEST_TAG" ]; then
54+
echo "Error: No semantic version tags found in repository"
55+
echo "Expected format: X.Y.Z (e.g., 12.5.0)"
56+
exit 1
57+
fi
58+
5159
echo "Latest tag found: $LATEST_TAG"
5260
5361
# Extract version numbers (remove 'v' prefix if present for backwards compatibility)

0 commit comments

Comments
 (0)