From 4a12bdbcf7019457160730c0530e3ac96fc40e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor=20Guerra?= Date: Sat, 23 Sep 2023 14:48:21 -0300 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1c9d8e1a..ed1474d1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -48,9 +48,15 @@ jobs: name: artifacts path: ./wheelhouse/*.whl - upload_pypi: - needs: [build_sdist, build_wheels] + pypi-publish: + name: Upload release to PyPI runs-on: ubuntu-latest + needs: [build_sdist, build_wheels] + environment: + name: pypi + url: https://pypi.org/p/pyKVFinder + permissions: + id-token: write steps: - uses: actions/setup-python@v4 @@ -62,10 +68,8 @@ jobs: name: artifacts path: ./dist - - name: Upload artifacts to PyPI - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - pip install -U twine - twine upload dist/* \ No newline at end of file + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} +