diff --git a/.github/workflows/publish-testpypi.yml b/.github/workflows/publish-testpypi.yml index d094cca..86edb5b 100644 --- a/.github/workflows/publish-testpypi.yml +++ b/.github/workflows/publish-testpypi.yml @@ -37,8 +37,8 @@ jobs: env: INPUT_TAG: ${{ inputs.tag }} run: | - if [[ ! "$INPUT_TAG" =~ ^v[0-9] ]]; then - echo "Invalid tag format: $INPUT_TAG (expected v[0-9]...)" + if [[ ! "$INPUT_TAG" =~ ^v?[0-9] ]]; then + echo "Invalid tag format: $INPUT_TAG (expected [v]N.N.N)" exit 1 fi TAG_VERSION="${INPUT_TAG#v}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e65c434..f0aae84 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,8 +37,8 @@ jobs: env: INPUT_TAG: ${{ inputs.tag || github.ref_name }} run: | - if [[ ! "$INPUT_TAG" =~ ^v[0-9] ]]; then - echo "Invalid tag format: $INPUT_TAG (expected v[0-9]...)" + if [[ ! "$INPUT_TAG" =~ ^v?[0-9] ]]; then + echo "Invalid tag format: $INPUT_TAG (expected [v]N.N.N)" exit 1 fi TAG_VERSION="${INPUT_TAG#v}"