From a62be392fa662ed2071ce56a532e9dc968b1aefb Mon Sep 17 00:00:00 2001 From: Peter Somhorst <> Date: Tue, 25 Aug 2026 14:48:53 +0200 Subject: [PATCH] Update PyPi release workflow to use trusted publisher rather than API tokens --- .github/workflows/release_pypi.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml index e378911d8..07bc812ff 100644 --- a/.github/workflows/release_pypi.yml +++ b/.github/workflows/release_pypi.yml @@ -27,27 +27,26 @@ jobs: needs: [build] runs-on: ubuntu-latest if: github.event_name == 'workflow_dispatch' + permissions: + id-token: write steps: - uses: actions/download-artifact@v4 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.4.2 + - uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ - password: ${{ secrets.TEST_PYPI_TOKEN_ALIVE }} - repository_url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ upload_pypi: needs: [build] runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' + permissions: + id-token: write steps: - uses: actions/download-artifact@v4 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.4.2 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN_ALIVE }} + - uses: pypa/gh-action-pypi-publish@release/v1