Skip to content

Commit b398f52

Browse files
authored
Update release workflow to use Trusted Publishing (#593)
1 parent 6f4d622 commit b398f52

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- published
77

88
env:
9-
DEFAULT_PYTHON: 3.12
9+
DEFAULT_PYTHON: 3.13
1010

1111
jobs:
1212
release-pypi:
@@ -16,6 +16,7 @@ jobs:
1616
name: PyPI
1717
url: https://pypi.org/project/python-typing-update/
1818
permissions:
19+
id-token: write # Required for publishing with OIDC to PyPI
1920
contents: write # Required to upload release assets
2021
steps:
2122
- name: Check out code from Github
@@ -27,16 +28,11 @@ jobs:
2728
python-version: ${{ env.DEFAULT_PYTHON }}
2829
- name: Build distributions
2930
run: |
30-
python -m pip install -U pip twine build
31+
python -m pip install -U pip build
3132
python -m build
3233
- name: Upload to PyPI
3334
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
34-
env:
35-
TWINE_REPOSITORY: pypi
36-
TWINE_USERNAME: __token__
37-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
38-
run: |
39-
twine upload --verbose dist/*
35+
uses: pypa/[email protected]
4036
- name: Upload release assets
4137
uses: softprops/[email protected]
4238
with:

0 commit comments

Comments
 (0)