Skip to content

Commit ee95e9f

Browse files
authored
Switch to Trusted Publishers with a GitHub Environment
1 parent 3a15421 commit ee95e9f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ jobs:
109109
publish:
110110
runs-on: ubuntu-latest
111111
needs: [lint, test, package-sdist, package-wheel]
112+
environment: publish
113+
permissions:
114+
# Required by Trusted Publishing
115+
id-token: write
112116
steps:
113117
- uses: actions/checkout@v5
114118
- uses: actions/download-artifact@v6
@@ -130,6 +134,3 @@ jobs:
130134
- name: Publish to PyPI
131135
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
132136
uses: pypa/gh-action-pypi-publish@release/v1
133-
with:
134-
user: __token__
135-
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)