From a53734dab0f79fa7b668962b55e6c0dfcb00de1f Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Wed, 7 Feb 2024 16:42:10 +0100 Subject: [PATCH] Fix publishing to PyPI via trusted publishing. Fix publishing to PyPI via trusted publishing as described in: https://github.com/PyO3/maturin/issues/1575 --- .github/workflows/CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 34ad699..2445697 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,17 +81,18 @@ jobs: release: name: Release + environment: release runs-on: ubuntu-latest if: "startsWith(github.ref, 'refs/tags/')" needs: [linux, macos, sdist] + permissions: + id-token: write steps: - uses: actions/download-artifact@v3 with: name: wheels - name: Publish to PyPI uses: PyO3/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} with: command: upload args: --non-interactive --skip-existing *