From ea5234fa17b8e3fb8caeb66aa171af75b54bcf78 Mon Sep 17 00:00:00 2001 From: Ihor Cherkashyn Date: Wed, 22 Apr 2026 17:04:30 +0200 Subject: [PATCH] GHA pypi publishing: allow tag without prefixed v --- .github/workflows/publish-testpypi.yml | 4 ++-- .github/workflows/publish.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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}"