From 86e99576be166695130fd5281efebf2ec8ee24e3 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Wed, 31 May 2023 13:00:43 +1000 Subject: [PATCH] Use OIDC for PyPI release Signed-off-by: Jordan Borean --- .github/workflows/ci.yml | 9 +++++---- docs/source/conf.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d68b94f5..0032f9c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -251,6 +251,10 @@ jobs: - windows runs-on: ubuntu-latest + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: - name: Check out code uses: actions/checkout@v3 @@ -323,7 +327,4 @@ jobs: - name: Deploy to PyPI if: startsWith(github.ref, 'refs/tags/v') - uses: pypa/gh-action-pypi-publish@v1.5.1 - with: - user: __token__ - password: ${{ secrets.pypi_password }} + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/docs/source/conf.py b/docs/source/conf.py index 1644b8cd..b7a88039 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -316,7 +316,7 @@ # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://docs.python.org/': None} +intersphinx_mapping = {'python': ('http://docs.python.org/', None)} # which docstring to use for the class # can be 'class', 'init', or 'both'