Skip to content

Commit 9289833

Browse files
committed
Fix regex for version extraction in CI workflow
Signed-off-by: Nicholas Pace <segfly@users.noreply.github.com>
1 parent 1881c93 commit 9289833

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
5757
# Ensure the version in pyproject.toml matches the git tag
5858
GIT_TAG_VERSION=${GITHUB_REF#refs/tags/v}
59-
PYPROJECT_VERSION=$(grep -Po '(?<=^version = ")[^"]*' pyproject.toml)
59+
PYPROJECT_VERSION=$(grep -Eo '^version\s*=\s*"[0-9.]*' pyproject.toml | cut -d'"' -f2)
6060
if [[ "${GITHUB_REF#refs/tags/v}" != "$PYPROJECT_VERSION" ]]; then
6161
echo "::error::Version mismatch! Git tag ($GIT_TAG_VERSION) doesn't match pyproject.toml version ($PYPROJECT_VERSION)"
6262
exit 1
@@ -128,4 +128,4 @@ jobs:
128128
if: ${{ !env.ACT }}
129129
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e #v1.13.0
130130
with:
131-
repository-url: ${{ needs.prepublish.outputs.repository_url }}
131+
repository-url: ${{ needs.prepublish.outputs.repository_url }}

0 commit comments

Comments
 (0)