diff --git a/.github/workflows/publish-testpypi.yml b/.github/workflows/publish-testpypi.yml index d456c6f1a5..5e5823428b 100644 --- a/.github/workflows/publish-testpypi.yml +++ b/.github/workflows/publish-testpypi.yml @@ -23,6 +23,10 @@ jobs: run: | python -m pip install --upgrade pip pip install build + - name: change mitiq version + run: | + truncate -s -1 VERSION.txt + echo "$(date +"%Y%m%d")" >> VERSION.txt - name: Build mitiq run: python -m build - name: Store build artifacts @@ -50,27 +54,3 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ - - verify-version: - needs: test-publish - runs-on: ubuntu-latest - environment: testpypi - steps: - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - name: Install package from TestPyPI - run: pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.python.org/simple/ mitiq - - name: Set version variable - run: | - VER=$(cat VERSION.txt) - echo "VERSION=$VER" >> $GITHUB_ENV - - - name: Verify the published version - run: | - TEST_IMPORT_VERSION=$(python -c "import mitiq; print(mitiq.__version__)") - if [ "$TEST_IMPORT_VERSION" != "$VERSION" ]; then - echo "Imported version $TEST_IMPORT_VERSION does not match tag $VERSION" - exit 1 - fi