Skip to content

Commit 79982b3

Browse files
committed
Allow flexible PyPI tag pattern and add concurrency
Relax tag matching for releases from 'v*.*.*' to 'v*' so post/rc tags are allowed while relying on the existing version check to validate tags. Add a concurrency group (pypi-release-${{ github.ref }}) and set cancel-in-progress: false to better control parallel release runs. Also streamline the twine upload step to a single-line command.
1 parent f5b9df1 commit 79982b3

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ name: Update PyPI release
33
on:
44
push:
55
tags:
6-
- 'v*.*.*'
6+
# v*.*.* does NOT allow post/rc tags
7+
# the "matching with version" check ensures that
8+
# the tag version matches the package version,
9+
# so we can allow more flexible tag formats here
10+
- 'v*'
11+
12+
concurrency:
13+
group: pypi-release-${{ github.ref }}
14+
cancel-in-progress: false
715

816
jobs:
917
release:
@@ -47,5 +55,4 @@ jobs:
4755
env:
4856
TWINE_USERNAME: __token__
4957
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
50-
run: |
51-
python -m twine upload --verbose dist/*
58+
run: python -m twine upload --verbose dist/*

0 commit comments

Comments
 (0)