Skip to content

Commit 1e4b225

Browse files
authored
Added a check to append '.0' to version if it is in 'X.Y' format.
Added a check to append '.0' to version if it is in 'X.Y' format.
1 parent 23033cd commit 1e4b225

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ jobs:
5757
run: |
5858
# Extract version from tag (e.g., v1.2.3 -> 1.2.3, also handles 1.2.3)
5959
TAG_VERSION=$(echo "$GITHUB_REF_NAME" | sed 's/^v//')
60+
61+
# Fix: If version is format 1.2, append .0 to make it 1.2.0
62+
if [[ "$TAG_VERSION" =~ ^[0-9]+\.[0-9]+$ ]]; then
63+
TAG_VERSION="${TAG_VERSION}.0"
64+
echo "Formatted version to semantic version: $TAG_VERSION"
65+
fi
66+
6067
# Validate version format
6168
if [[ ! "$TAG_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
6269
echo "Error: Invalid version format: $TAG_VERSION"

0 commit comments

Comments
 (0)