diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 2d7155c..86609c4 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -14,6 +14,15 @@ jobs: contents: read steps: + - name: Check tag format + run: | + TAG="${GITHUB_REF##refs/tags/}" + echo "Tag: $TAG" + if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(a[0-9]+|b[0-9]+|rc[0-9]+)?$ ]]; then + echo "Tag does not match version pattern. Skipping." + exit 1 + fi + - name: Checkout code uses: actions/checkout@v4