Skip to content

Commit 9123c18

Browse files
fix: Update regex in check-version-bump.yml to support semantic versioning with pre-release labels
1 parent 1893f52 commit 9123c18

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/check-version-bump.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || true)
8383
if [ -z "$LATEST_TAG" ]; then
8484
echo "No existing tags found. Skipping semver vs tag check."
85-
CHANGELOG_HEAD=$(sed -nE 's/^## \[v?([0-9]+\.[0-9]+\.[0-9]+)\].*/\1/p' CHANGELOG.md | head -1)
85+
CHANGELOG_HEAD=$(sed -nE 's/^## \[v?([0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z][0-9A-Za-z.-]*)?)\].*/\1/p' CHANGELOG.md | head -1)
8686
if [ -z "$CHANGELOG_HEAD" ]; then
8787
echo "::error::Could not find a ## [vX.Y.Z] entry at the top of CHANGELOG.md."
8888
exit 1
@@ -105,7 +105,7 @@ jobs:
105105
exit 1
106106
fi
107107
108-
CHANGELOG_HEAD=$(sed -nE 's/^## \[v?([0-9]+\.[0-9]+\.[0-9]+)\].*/\1/p' CHANGELOG.md | head -1)
108+
CHANGELOG_HEAD=$(sed -nE 's/^## \[v?([0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z][0-9A-Za-z.-]*)?)\].*/\1/p' CHANGELOG.md | head -1)
109109
if [ -z "$CHANGELOG_HEAD" ]; then
110110
echo "::error::Could not find a ## [vX.Y.Z] entry at the top of CHANGELOG.md."
111111
exit 1

0 commit comments

Comments
 (0)