From 9dddaa3706fed3ec1254bbd43ae63821a6712b5a Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Fri, 26 Jan 2024 16:02:15 +0100 Subject: [PATCH] Retrieve correct tag in test pypi action --- .github/workflows/publish-to-pypi-test.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-pypi-test.yml b/.github/workflows/publish-to-pypi-test.yml index 440f9eec3..71e7b9409 100644 --- a/.github/workflows/publish-to-pypi-test.yml +++ b/.github/workflows/publish-to-pypi-test.yml @@ -20,11 +20,19 @@ jobs: python -m pip install --upgrade pip pip install setuptools wheel twine build pip install . + - name: Get the tag version + id: get-version + run: | + echo ${GITHUB_REF#refs/tags/} + echo "TAG::${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - name: Test version/tag correspondence id: version-check run: | neo_version=$(python -c "import neo; print(neo.__version__)") - if [[ ${{ github.event.release.tag_name }} == $neo_version ]]; then + tag_version=${{ steps.get-version.outputs.TAG }} + echo $neo_version + echo $tag_version + if [[ $tag_version == $neo_version ]]; then echo "VERSION_TAG_MATCH=true" >> $GITHUB_OUTPUT echo "Version matches tag, proceeding with release to Test PyPI" else