Skip to content

Commit 86875e4

Browse files
committed
ci(release): Migrate to PyPI Trusted Publisher
why: Improve security by eliminating stored API tokens and enable package attestations what: - Add OIDC permissions (id-token, attestations) to release job - Remove user/password authentication in favor of trusted publishing - Enable attestations for supply chain security - Fix deprecated skip_existing to skip-existing
1 parent ae6ef8f commit 86875e4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ jobs:
5353
runs-on: ubuntu-latest
5454
needs: build
5555
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
56+
permissions:
57+
id-token: write
58+
attestations: write
5659

5760
strategy:
5861
matrix:
@@ -80,6 +83,5 @@ jobs:
8083
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
8184
uses: pypa/gh-action-pypi-publish@release/v1
8285
with:
83-
user: __token__
84-
password: ${{ secrets.PYPI_API_TOKEN }}
85-
skip_existing: true
86+
attestations: true
87+
skip-existing: true

0 commit comments

Comments
 (0)