From 20492e5adfd3127cb2aaa34b11b025901bd79c04 Mon Sep 17 00:00:00 2001 From: tensorlicious <50287193+tensorlicious@users.noreply.github.com> Date: Mon, 8 Nov 2021 17:59:37 +0000 Subject: [PATCH] fix pypi upload version --- .github/workflows/upload-pypi.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/upload-pypi.yaml b/.github/workflows/upload-pypi.yaml index 8f57acb0..ecf42a98 100644 --- a/.github/workflows/upload-pypi.yaml +++ b/.github/workflows/upload-pypi.yaml @@ -28,6 +28,14 @@ jobs: - uses: actions/setup-python@v2 with: python-version: 3.7 + - name: Verify git tag vs. VERSION + run: | + VERSION="v$(cat gpflux/version.py | grep "__version__ = " | sed -e 's/__version__ = //' | sed -e 's/"//g')" + TAG="${GITHUB_REF/refs\/tags\//}" + if [ "$VERSION" != "$TAG" ]; then + echo "The package version ($VERSION) and the latest tag version ($TAG) are different" + exit 1 + fi - name: Install twine and wheel run: | pip install twine wheel