Skip to content

Commit f209c3e

Browse files
committed
Update autodeploy to use OIDC
This replaces the need for API tokens in PyPI, which is both the more modern approach and less tied to individual accounts.
1 parent ee21585 commit f209c3e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/autodeploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ jobs:
7070
needs: [build_wheels, build_sdist]
7171
runs-on: ubuntu-latest
7272
if: github.event_name == 'release' && github.event.action == 'published'
73+
permissions:
74+
# IMPORTANT: this permission is mandatory for trusted publishing
75+
id-token: write
7376
steps:
7477
- uses: actions/download-artifact@v4
7578
with:
@@ -79,7 +82,5 @@ jobs:
7982

8083
- name: Publish package on PyPI
8184
uses: pypa/gh-action-pypi-publish@release/v1
82-
with:
83-
user: __token__
84-
password: ${{ secrets.PYPI_API_TOKEN }}
85-
verbose: true
85+
# With the use of OIDC, API tokens are no longer needed
86+
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/ for more info

0 commit comments

Comments
 (0)