Skip to content

Commit 33af048

Browse files
authored
ci(release): Migrate to PyPI Trusted Publisher (#615)
## Summary - Migrate PyPI publishing from API token to OIDC-based Trusted Publisher - Enable package attestations for supply chain security - Fix deprecated `skip_existing` parameter ## Changes - Add `permissions` block with `id-token: write` and `attestations: write` - Remove `user` and `password` parameters from publish step - Add `attestations: true` to enable cryptographic attestations - Change `skip_existing` to `skip-existing` (kebab-case)
2 parents 4df1128 + e7ab9c5 commit 33af048

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
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 # Required for OIDC trusted publishing
96+
attestations: write # Required for generating attestations
9497

9598
strategy:
9699
matrix:
@@ -118,6 +121,5 @@ jobs:
118121
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
119122
uses: pypa/gh-action-pypi-publish@release/v1
120123
with:
121-
user: __token__
122-
password: ${{ secrets.PYPI_API_TOKEN }}
123-
skip_existing: true
124+
attestations: true
125+
skip-existing: true

CHANGES

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ $ uvx --from 'libtmux' --prerelease allow python
3232

3333
<!-- To maintainers and contributors: Please add notes for the forthcoming version below -->
3434

35-
_Upcoming changes will be written here._
35+
### CI
36+
37+
#### Migrate to PyPI Trusted Publisher (#615)
38+
39+
PyPI publishing now uses OIDC-based Trusted Publisher instead of API tokens.
40+
This improves security and enables package attestations for supply chain verification.
3641

3742
## libtmux 0.52.0 (2025-12-07)
3843

0 commit comments

Comments
 (0)