Skip to content

Commit 69f2b7f

Browse files
Switch to Trusted Publishers with a GitHub Environment
Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
1 parent b043b49 commit 69f2b7f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 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
@@ -129,7 +133,4 @@ jobs:
129133
path: dist/
130134
- name: Publish to PyPI
131135
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
132-
uses: pypa/gh-action-pypi-publish@master
133-
with:
134-
user: __token__
135-
password: ${{ secrets.PYPI_TOKEN }}
136+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)