Skip to content

Commit 165141c

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 1010d6c commit 165141c

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
@@ -91,6 +91,9 @@ jobs:
9191
runs-on: ubuntu-latest
9292
needs: build
9393
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
94+
permissions:
95+
id-token: write
96+
attestations: write
9497

9598
strategy:
9699
matrix:
@@ -116,6 +119,5 @@ jobs:
116119
- name: Publish package
117120
uses: pypa/gh-action-pypi-publish@release/v1
118121
with:
119-
user: __token__
120-
password: ${{ secrets.PYPI_API_TOKEN }}
121-
skip_existing: true
122+
attestations: true
123+
skip-existing: true

0 commit comments

Comments
 (0)