diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index 4a12d88d..00a43173 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -45,8 +45,7 @@ jobs: - name: Get current release identifier # shellcheck disable=SC2062 run: | - RELESE_VERSION="$(echo ${{ github.event.release.name }} \ - | grep -E -o "v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")" + RELESE_VERSION="${{ github.event.release.name }}" if [ -z "${RELEASE_VERSION}" ]; then echo "No release version found in environment, using input..." @@ -59,6 +58,11 @@ jobs: exit 1 fi + if ! echo "${RELEASE_VERSION}" | grep -E -o "v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+"; then + echo "Error: RELEASE_VERSION doesn't look like a semantic version: ${RELEASE_VERSION}" + exit 2 + fi + { echo "RELEASE_VERSION=${RELESE_VERSION}" echo "SEMVER_VERSION=${RELEASE_VERSION#v}"