diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 49058733..793b74ed 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -28,15 +28,14 @@ jobs: - name: Install build tool run: pip install build - - name: Build a test source tarball + - name: Amend version for test release if: github.event.inputs.releasetype == 'test' run: | export PYTERRIER_VERSION_SUFFIX=".`date +%s`" - sed -Ei "1 s/'\$/.$PYTERRIER_VERSION_SUFFIX'/g" pyterrier/__init__.py + sed -Ei "1 s/'\$/$PYTERRIER_VERSION_SUFFIX'/g" pyterrier/__init__.py head -n 1 pyterrier/__init__.py - - name: Build a source tarball - if: github.event.inputs.releasetype == 'release' + - name: Build source tarball run: python -m build - name: Publish distribution 📦 to Test PyPI