From 5eadbc007a3444d777d13b353a53ba1760418bee Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 7 Oct 2025 20:08:24 +0200 Subject: [PATCH] .github: switch to trusted publisher workflow --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2aca751..ff677a6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,9 @@ jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI runs-on: ubuntu-24.04 + environment: pypi + permissions: + id-token: write steps: - uses: actions/checkout@v4 @@ -34,11 +37,8 @@ jobs: - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@v1.13.0 with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ - name: Publish distribution 📦 to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@v1.13.0 - with: - password: ${{ secrets.PYPI_API_TOKEN }}