Skip to content

Commit 03c2170

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 0ec1098 commit 03c2170

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
@@ -58,6 +58,9 @@ jobs:
5858
runs-on: ubuntu-latest
5959
needs: build
6060
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
61+
permissions:
62+
id-token: write
63+
attestations: write
6164

6265
strategy:
6366
matrix:
@@ -80,6 +83,5 @@ jobs:
8083
- name: Publish package
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)