From f4cf9cac5edc31f17341b0c34c04e1e491bd85f4 Mon Sep 17 00:00:00 2001 From: ramav87 Date: Tue, 27 Aug 2024 11:54:58 -0400 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) 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 -