File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ jobs:
129
129
needs : test-wheel
130
130
name : " publish to test.pypi"
131
131
runs-on : ubuntu-latest
132
+ permissions :
133
+ id-token : write # Mandatory for PyPI Trusted Publishing OpenID Connect (OIDC)
134
+ environment : test-pypi
135
+
132
136
# upload to Test PyPI for every commit on main branch
133
137
# and check for the SciTools repo
134
138
if : github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'SciTools'
@@ -138,18 +142,20 @@ jobs:
138
142
name : pypi-artifacts
139
143
path : ${{ github.workspace }}/dist
140
144
141
- - uses : pypa/gh-action-pypi-publish@release/v1
145
+ - uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
142
146
with :
143
- user : __token__
144
- password : ${{ secrets.TEST_PYPI_API_TOKEN }}
145
- repository_url : https://test.pypi.org/legacy/
146
- skip_existing : true
147
- print_hash : true
147
+ repository-url : https://test.pypi.org/legacy/
148
+ skip-existing : true
149
+ print-hash : true
148
150
149
151
publish-artifacts-pypi :
150
152
needs : test-wheel
151
153
name : " publish to pypi"
152
154
runs-on : ubuntu-latest
155
+ permissions :
156
+ id-token : write # Mandatory for PyPI Trusted Publishing OpenID Connect (OIDC)
157
+ environment : pypi
158
+
153
159
# upload to PyPI for every tag starting with 'v'
154
160
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') && github.repository_owner == 'SciTools'
155
161
steps :
@@ -158,8 +164,6 @@ jobs:
158
164
name : pypi-artifacts
159
165
path : ${{ github.workspace }}/dist
160
166
161
- - uses : pypa/gh-action-pypi-publish@release/v1
167
+ - uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
162
168
with :
163
- user : __token__
164
- password : ${{ secrets.PYPI_API_TOKEN }}
165
- print_hash : true
169
+ print-hash : true
You can’t perform that action at this time.
0 commit comments