@@ -34,18 +34,21 @@ jobs:
34
34
run : |
35
35
stable_version=$(gh release list --limit 1 --order desc --exclude-pre-releases --json tagName --jq ".[].tagName")
36
36
echo "Latest release is $stable_version"
37
- rc_version=$(gh release list --json tagName --jq ".[] | select(.tagName | test(\"${version}-rc*\")) | .tagName")
38
- echo "Latest release candidate is $rc_version"
39
37
40
- if [[ -z ${rc_version} ]]; then
41
- # Extract the major, minor, and patch versions
42
- IFS='.' read -r major minor patch <<< "$stable_version"
38
+ # Extract the major, minor, and patch versions
39
+ IFS='.' read -r major minor patch <<< "$stable_version"
43
40
44
- # Increment the patch version
45
- new_patch=$((patch + 1))
41
+ # Increment the patch version
42
+ new_patch=$((patch + 1))
46
43
47
- # Construct the new version string
48
- version="$major.$minor.$new_patch-rc1"
44
+ new_version="$major.$minor.$new_patch"
45
+
46
+ rc_version=$(gh release list --json tagName --jq ".[] | select(.tagName | test(\"${new_version}-rc*\")) | .tagName")
47
+ echo "Latest release candidate is $rc_version"
48
+
49
+ if [[ -z ${rc_version} ]]; then
50
+ # Construct the new version string using new_version
51
+ version="${new_version}-rc1"
49
52
50
53
echo "New version: $version"
51
54
0 commit comments