Skip to content

Commit decaf15

Browse files
authored
Add id-token permission for PyPI trusted publishing (#113)
1 parent 093c2ad commit decaf15

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/wheels.yml

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ concurrency:
2525
group: ${{ github.workflow }}-${{ github.ref }}
2626
cancel-in-progress: true
2727

28+
permissions:
29+
# For PyPI Trusted Publisher
30+
id-token: write
31+
2832
jobs:
2933
build_sdist:
3034
name: Build SDist
@@ -225,6 +229,7 @@ jobs:
225229

226230
# Upload to PyPI
227231
- uses: pypa/gh-action-pypi-publish@release/v1
232+
name: Upload to PyPI
228233
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_dest == 'PyPI')
229234
with:
230235
# PyPI does not allow replacing a file. Without this flag the entire action fails if even a single duplicate exists.
@@ -234,6 +239,7 @@ jobs:
234239

235240
# Upload to Test PyPI
236241
- uses: pypa/gh-action-pypi-publish@release/v1
242+
name: Upload to Test PyPI
237243
if: github.event_name == 'workflow_dispatch' && github.event.inputs.upload_dest == 'Test PyPI'
238244
with:
239245
# PyPI does not allow replacing a file. Without this flag the entire action fails if even a single duplicate exists.

0 commit comments

Comments
 (0)