Add tag format validation step to PyPI publish workflow
This commit is contained in:
parent
81ea79a94d
commit
db72e604fb
9
.github/workflows/pypi.yml
vendored
9
.github/workflows/pypi.yml
vendored
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user