From db72e604fb84e03b0ecf120a1ee8fc9dfb146f43 Mon Sep 17 00:00:00 2001 From: Slipstream Date: Tue, 10 Jun 2025 16:11:55 -0600 Subject: [PATCH] Add tag format validation step to PyPI publish workflow --- .github/workflows/pypi.yml | 9 +++++++++ 1 file changed, 9 insertions(+) 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