diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index db791b6..0bd5b57 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -30,9 +30,10 @@ jobs: id: validate_title run: | branch_name="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" + branch_name=$(echo "$branch_name" | tr -d '[:space:]') echo "Branch name: $branch_name" - if [[ "$branch_name" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9-_]+)?$ ]]; then + if [[ "$branch_name" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9_-.]+)?$ ]]; then version=$(echo "$branch_name" | grep -oE '^v[0-9]+\.[0-9]+\.[0-9]+') echo "version=$version" >> "$GITHUB_OUTPUT" echo "Matched version: $version"