Skip to content

Commit 4e4f67b

Browse files
authored
Use OIDC publishing for PyPI release (#54)
1 parent 916af0b commit 4e4f67b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/wheel.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,21 @@ jobs:
1111
publish-wheels:
1212
name: Publish Wheels
1313
runs-on: ubuntu-latest
14+
environment: release
15+
permissions:
16+
contents: read
17+
id-token: write
1418
steps:
1519
- uses: actions/checkout@v4
1620
- name: Set up Python
1721
uses: actions/setup-python@v5
18-
- name: Build Weel
22+
- name: Build Wheel
1923
run: |
20-
pip install wheel twine
21-
python setup.py sdist bdist_wheel
24+
pip install build
25+
python -m build
2226
- name: Deploy to PyPI on Tags
2327
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
24-
env:
25-
TWINE_USERNAME: __token__
26-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
27-
run: twine upload --skip-existing dist/*
28+
uses: pypa/gh-action-pypi-publish@release/v1
2829
- name: Make index
2930
uses: banesullivan/create-pip-index-action@main
3031
with:

0 commit comments

Comments
 (0)