diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac748ae..dbea6a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,19 +66,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload to PyPi + if: startsWith( github.ref, 'refs/tags') && matrix.python-version == env.PYTHON_MAIN_VERSION + env: + PYPI_TOKEN_PASSWORD: ${{ secrets.API_TOKEN_BGLIB }} + run: | + pip install wheel twine + python setup.py sdist bdist_wheel + twine upload --username "__token__" --password $PYPI_TOKEN_PASSWORD dist/* - pypi-publish: - name: Upload to PyPi - runs-on: ubuntu-latest - # Specifying a GitHub environment is optional, but strongly encouraged - #environment: release - permissions: - # IMPORTANT: this permission is mandatory for trusted publishing - id-token: write - steps: - # retrieve your distributions here - - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 -