From 4f31b39ef37e7ae69b65072639d6329be45bacc2 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Tue, 25 Apr 2023 11:16:12 +0200 Subject: [PATCH] Switch publish to official pypi action using the trusted flow at https://docs.pypi.org/trusted-publishers/ --- .github/workflows/upload_to_pypi.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/upload_to_pypi.yaml b/.github/workflows/upload_to_pypi.yaml index 545c88646..6e5863fc2 100644 --- a/.github/workflows/upload_to_pypi.yaml +++ b/.github/workflows/upload_to_pypi.yaml @@ -9,7 +9,8 @@ jobs: deploy: runs-on: ubuntu-latest - + permissions: + id-token: write steps: - uses: actions/checkout@v3.5.2 - name: Set up Python @@ -23,9 +24,6 @@ jobs: python -m build - name: Install Twine run: pip install twine - - name: Publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - twine upload dist/* + - name: Publish to pypi + uses: pypa/gh-action-pypi-publish@release/v1 +