@@ -31,21 +31,25 @@ jobs:
31
31
- name : Check for current version tag. Create if it doesn't exist
32
32
env :
33
33
GH_TOKEN : ${{ github.token }}
34
+ shell : bash
34
35
run : |
35
36
stable_version=$(gh release list --limit 1 --order desc --exclude-pre-releases --json tagName --jq ".[].tagName")
36
37
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
38
40
- if [[ -z ${rc_version} ]]; then
41
- # Extract the major, minor, and patch versions
42
- IFS='.' read -r major minor patch <<< "$stable_version"
39
+ # Extract the major, minor, and patch versions
40
+ IFS='.' read -r major minor patch <<< "$stable_version"
43
41
44
- # Increment the patch version
45
- new_patch=$((patch + 1))
42
+ # Increment the patch version
43
+ new_patch=$((patch + 1))
46
44
47
- # Construct the new version string
48
- version="$major.$minor.$new_patch-rc1"
45
+ new_version="$major.$minor.$new_patch"
46
+
47
+ rc_version=$(gh release list --json tagName --jq ".[] | select(.tagName | test(\"${new_version}-rc*\")) | .tagName")
48
+ echo "Latest release candidate is $rc_version"
49
+
50
+ if [[ -z ${rc_version} ]]; then
51
+ # Construct the new version string using new_version
52
+ version="${new_version}-rc1"
49
53
50
54
echo "New version: $version"
51
55
0 commit comments