Skip to content

Commit 3243f46

Browse files
committed
Trusted publisher for PyPI
1 parent 257cb72 commit 3243f46

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ jobs:
7979
github_token=${{ secrets.GITHUB_TOKEN }}
8080
8181
pypi-release:
82+
permissions:
83+
# IMPORTANT: this permission is mandatory for trusted publishing
84+
id-token: write
8285
runs-on: ubuntu-latest
86+
environment: pypi-release
8387
steps:
8488
- name: Checkout
8589
uses: actions/checkout@v4
@@ -103,5 +107,3 @@ jobs:
103107

104108
- name: Publish the release artifacts to PyPI
105109
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # pin@release/v1.12.4
106-
with:
107-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)