Skip to content

Commit 28884c4

Browse files
authored
ci(release) Migrate to PyPI Trusted Publisher (#43)
## 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 49cc121 + e642cd7 commit 28884c4

2 files changed

Lines changed: 9 additions & 5 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:
@@ -76,6 +79,5 @@ jobs:
7679
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
7780
uses: pypa/gh-action-pypi-publish@release/v1
7881
with:
79-
user: __token__
80-
password: ${{ secrets.PYPI_API_TOKEN }}
81-
skip_existing: true
82+
attestations: true
83+
skip-existing: true

CHANGES

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ $ uvx --from 'g' --prerelease allow g
2929

3030
## g 0.0.9 (unreleased)
3131

32-
- _Notes on upcoming releases will be added here_
33-
3432
<!-- Maintainers, insert changes / features for the next release here -->
3533

34+
### Packaging
35+
36+
- Migrate to PyPI Trusted Publisher (#43)
37+
3638
### Documentation
3739

3840
- Migrate docs deployment to AWS OIDC authentication and AWS CLI

0 commit comments

Comments
 (0)