Skip to content

Commit e748413

Browse files
authored
ci(release) Migrate to PyPI Trusted Publisher (#332)
### Summary - Migrate PyPI publishing from API token to OIDC-based Trusted Publisher - Enable package attestations for supply chain security - Fix deprecated `skip_existing` parameter
2 parents c064728 + 9d68f0b commit e748413

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
runs-on: ubuntu-latest
5050
needs: build
5151
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
52+
permissions:
53+
id-token: write
54+
attestations: write
5255

5356
strategy:
5457
matrix:
@@ -74,6 +77,5 @@ jobs:
7477
- name: Publish package
7578
uses: pypa/gh-action-pypi-publish@release/v1
7679
with:
77-
user: __token__
78-
password: ${{ secrets.PYPI_API_TOKEN }}
79-
skip_existing: true
80+
attestations: true
81+
skip-existing: true

CHANGES

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ $ uvx --from 'cihai-cli' --prerelease allow cihai
3232

3333
<!-- Maintainers, insert changes / features for the next release here -->
3434

35-
- _Changes for the upcoming release go here._
35+
### CI
36+
37+
- Migrate to PyPI Trusted Publisher (#332)
3638

3739
### Development
3840

0 commit comments

Comments
 (0)