Skip to content

Commit 43c757f

Browse files
committed
Use pypa/gh-actions-pypi-publish for releasing with trusted publishers
1 parent 098927d commit 43c757f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/python-publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
deploy:
1212

1313
runs-on: ubuntu-latest
14+
permissions:
15+
id-token: write
1416

1517
steps:
1618
- uses: actions/checkout@v3
@@ -21,11 +23,9 @@ jobs:
2123
- name: Install dependencies
2224
run: |
2325
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine numpy cython
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
pip install setuptools wheel numpy cython
27+
- name: Build
2928
run: |
3029
python setup.py sdist
31-
twine upload dist/*.tar.gz
30+
- name: Publish
31+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)