diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index d49dd04..54b84c0 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -30,6 +30,7 @@ jobs: run: | python -m pip install --upgrade pip pip install build + - name: Build package run: >- python -m build @@ -37,12 +38,17 @@ jobs: --wheel --outdir dist/ . - #- name: Publish package - # uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - # with: - # user: __token__ - # password: ${{ secrets.PYPI_TOKEN }} - # skip_existing: true + - name: Extract tag name + id: tag + run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3) + + - name: Update version in setup.py + run: >- + sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py + + - name: Build a binary wheel + run: >- + python setup.py sdist bdist_wheel - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1