diff --git a/.github/workflows/build_package.yaml b/.github/workflows/build_package.yaml index dfbb4c6..26f2999 100644 --- a/.github/workflows/build_package.yaml +++ b/.github/workflows/build_package.yaml @@ -29,10 +29,17 @@ jobs: run: | python setup.py sdist bdist_wheel - - name: Upload package to pypi - shell: bash - run: | - twine upload --skip-existing dist/* - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_PASSWORD }} + +# - name: Upload package to pypi +# shell: bash +# run: | +# twine upload --skip-existing dist/* +# env: +# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} +# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}