Skip to content

Commit 86e31a2

Browse files
authored
fix(ci): update release tag check to support PEP 440 pre-release versions (#87)
Update the tag format regex to accept all PEP 440 version identifiers: alpha (a), beta (b), release candidate (rc), post-release (.post), and dev releases (.dev), in addition to final releases (1.2.3). Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
1 parent edeb3af commit 86e31a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/check_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
steps:
99
- name: Check tag format
1010
run: |
11-
if ! echo "${{ github.ref }}" | grep -qE '^refs/tags/[0-9]+\.[0-9]+\.[0-9]+'; then
12-
echo "Tag must be a semver version like 1.2.3 (no v prefix)"
11+
if ! echo "${{ github.ref }}" | grep -qE '^refs/tags/[0-9]+(\.[0-9]+)*(a[0-9]+|b[0-9]+|rc[0-9]+)?(\.post[0-9]+)?(\.dev[0-9]+)?$'; then
12+
echo "Tag must be a PEP 440 version like 1.2.3, 1.2.3a1, 1.2.3b2, 1.2.3rc1, 1.2.3.post1 (no v prefix)"
1313
exit 1
1414
fi
1515
- name: Check branch

0 commit comments

Comments
 (0)