Skip to content

Commit 62dd2dc

Browse files
committed
Fix bad substituation error
1 parent fadb7dc commit 62dd2dc

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/template_release_version.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,13 @@ jobs:
5555
# fetch last tag name from github releases which are not drafts or pre-releases and starts with the given prefix
5656
OLD_TAG_NAME=`gh release list -R ${{ github.repository }} --limit 100 --exclude-drafts --exclude-pre-releases --json tagName --jq '[.[] | select(.tagName | startswith("${TAG_PREFIX}") and endswith("${TAG_SUFFIX}"))] | .[0].tagName'`
5757
58+
echo "Last tag name: ${OLD_TAG_NAME}"
59+
5860
# remove prefix and suffix
59-
OLD_VERSION=${${OLD_TAG_NAME#${TAG_PREFIX}}%${TAG_SUFFIX}}
61+
OLD_VERSION=${OLD_TAG_NAME#${TAG_PREFIX}}
62+
OLD_VERSION=${OLD_VERSION%${TAG_SUFFIX}}
63+
64+
echo "Last version: ${OLD_VERSION}"
6065
6166
PARTS=(${OLD_VERSION//./ })
6267
COUNTER=${PARTS[2]}
@@ -82,6 +87,12 @@ jobs:
8287
# increase Version
8388
COUNTER=$((COUNTER+1))
8489
85-
echo "next_version=${YEAR}.${MINOR}.${COUNTER}" >> $GITHUB_OUTPUT
86-
echo "next_tag=${TAG_PREFIX}${YEAR}.${MINOR}.${COUNTER}${TAG_SUFFIX}" >> $GITHUB_OUTPUT
90+
NEW_VERSION="${YEAR}.${MINOR}.${COUNTER}"
91+
NEW_TAG="${TAG_PREFIX}${NEW_VERSION}${TAG_SUFFIX}"
92+
93+
echo "Next version: ${NEW_VERSION}"
94+
echo "Next tag: ${NEW_TAG}"
95+
96+
echo "next_version=${NEW_VERSION}" >> $GITHUB_OUTPUT
97+
echo "next_tag=${NEW_TAG}" >> $GITHUB_OUTPUT
8798
shell: bash

0 commit comments

Comments
 (0)