File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,14 +158,15 @@ jobs:
158158 # Dry run mode: use short git SHA and get next version for summary
159159 VERSION_TAG=$(git rev-parse --short HEAD)
160160 echo "Getting next_version"
161- NEXT_VERSION=$(grep -i 'The next release version is' semantic-release-output.log | sed -E 's/.* ([[:digit:].]+)$/\1/')
161+ NEXT_VERSION=$(grep -i 'The next release version is' semantic-release-output.log | sed -E 's/.* ([[:digit:].]+)$/\1/' || true)
162+ NEXT_VERSION=${NEXT_VERSION:-UNKNOWN}
162163 echo "got next version"
163164 # disabling shellcheck as replace does not work
164165 # shellcheck disable=SC2001
165166 NEW_VERSION_TAG=$(echo "$TAG_FORMAT" | sed "s/\${version}/$NEXT_VERSION/")
166167 echo "## VERSION TAG : ${VERSION_TAG}" >> "$GITHUB_STEP_SUMMARY"
167168 echo "## NEXT TAG WILL BE : ${NEW_VERSION_TAG}" >> "$GITHUB_STEP_SUMMARY"
168- if [ -z "${NEXT_VERSION}" ]
169+ if [ "${NEXT_VERSION}" == "UNKNOWN " ]
169170 then
170171 echo "Could not get next tag. Here is the log from semantic-release"
171172 cat semantic-release-output.log
You can’t perform that action at this time.
0 commit comments