Skip to content

Commit 71be0d8

Browse files
committed
fix pypi publish flow
1 parent ae60cb8 commit 71be0d8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ jobs:
216216
pypi-publish:
217217
needs: [sync-and-tag, build]
218218
runs-on: ubuntu-latest
219+
permissions:
220+
contents: read
221+
id-token: write
219222
steps:
220223
- name: Checkout
221224
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
@@ -234,7 +237,7 @@ jobs:
234237
python-version: '3.12'
235238

236239
- name: Install build tools
237-
run: pip install build twine
240+
run: pip install build
238241

239242
- name: Stage binaries
240243
run: |
@@ -265,7 +268,6 @@ jobs:
265268
run: python -m build pypi/socket-patch
266269

267270
- name: Publish to PyPI
268-
env:
269-
TWINE_USERNAME: __token__
270-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
271-
run: twine upload pypi/socket-patch/dist/*
271+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b54a752e1b56a22940bc7640 # v1.12.4
272+
with:
273+
packages-dir: pypi/socket-patch/dist/

0 commit comments

Comments
 (0)