We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f4d94a commit 8adec2bCopy full SHA for 8adec2b
1 file changed
.github/workflows/ci.yml
@@ -17,6 +17,9 @@ on:
17
default: false
18
type: boolean
19
20
+permissions:
21
+ contents: read
22
+
23
jobs:
24
test:
25
name: Test (Python ${{ matrix.python-version }})
@@ -66,6 +69,10 @@ jobs:
66
69
(github.event_name == 'workflow_dispatch' && github.event.inputs.publish_to_pypi == 'true')
67
70
)
68
71
72
+ permissions:
73
74
+ id-token: write
75
76
steps:
77
- uses: actions/checkout@v4
78
@@ -82,4 +89,7 @@ jobs:
82
89
- name: Publish to PyPI
83
90
uses: pypa/gh-action-pypi-publish@release/v1
84
91
with:
92
+ # If PYPI_API_TOKEN is set, token-based upload is used.
93
+ # If it's missing, the action falls back to trusted publishing (OIDC),
94
+ # which requires `id-token: write` permissions.
85
95
password: ${{ secrets.PYPI_API_TOKEN }}
0 commit comments