Skip to content

Commit 08dbb06

Browse files
⬆️ CI/CD: Updated
1 parent 73a7bfc commit 08dbb06

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/candidate-release.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ jobs:
2020

2121
- name: Create tag
2222
run: |
23-
echo VERSION="${TAG##*/}" >> $GITHUB_ENV
24-
echo RC="$(git ls-remote --tags origin | grep $VERSION" >> $GITHUB_ENV
25-
echo "${RC:0-1}"
23+
echo CURRENT_VERSION="${TAG##*/}"
24+
echo $CURRENT_VERSION
2625
27-
if [[ -n "$RC" ]]; then
28-
echo "${TAG}-rc-`expr "${RC:0-1}" + 1`"
26+
echo OUTPUT="$(git ls-remote --tags origin | grep $CURRENT_VERSION" >> $GITHUB_ENV
27+
echo "${OUTPUT:0-1}"
28+
29+
if [[ -n "$OUTPUT" ]]; then
30+
echo "${CURRENT_VERSION}-rc-`expr "${OUTPUT:0-1}" + 1`"
2931
else
30-
echo "${TAG}-rc-1"
32+
echo "${CURRENT_VERSION}-rc-1"
3133
fi
3234
shell: bash
3335

0 commit comments

Comments
 (0)