diff --git a/.github/workflows/module-test-pipeline.yml b/.github/workflows/module-test-pipeline.yml index 7cfbfdd..5e4d113 100644 --- a/.github/workflows/module-test-pipeline.yml +++ b/.github/workflows/module-test-pipeline.yml @@ -69,8 +69,11 @@ jobs: - name: Ensure version reflects release candidate version run: | - VERSION=$(echo "${GITHUB_REF_NAME}" | cut -d'v' -f2) - echo $VERSION > VERSION + # only if ${GITHUB_REF_NAME} starts with 'v' or 'dev' and followed by a semver + if [[ $GITHUB_REF_NAME =~ ^(v|dev)[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then + VERSION=$(echo "${GITHUB_REF_NAME}" | cut -d'v' -f2) + echo $VERSION > VERSION + fi - name: Check changed files uses: tj-actions/verify-changed-files@v17