Skip to content

Commit 5d28037

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 89be5c0 commit 5d28037

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ jobs:
5959
runs-on: ubuntu-latest
6060
needs: build
6161
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
62+
permissions:
63+
id-token: write
64+
attestations: write
6265

6366
strategy:
6467
matrix:
@@ -86,6 +89,5 @@ jobs:
8689
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
8790
uses: pypa/gh-action-pypi-publish@release/v1
8891
with:
89-
user: __token__
90-
password: ${{ secrets.PYPI_API_TOKEN }}
91-
skip_existing: true
92+
attestations: true
93+
skip-existing: true

0 commit comments

Comments
 (0)