Skip to content

Commit 3dfb9e7

Browse files
committed
WIP: add trusted publishing to PyPI and TestPyPI
1 parent 1ae5ff8 commit 3dfb9e7

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/wheels.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,38 @@ jobs:
162162
with:
163163
name: sdist
164164
path: ./dist/*
165+
166+
testpypi-publish:
167+
name: Upload release to TestPyPI
168+
if: # TODO - add a release True/False? and on `main`?
169+
needs: [build_wheels, build_sdist]
170+
runs-on: ubuntu-latest
171+
environment:
172+
name: pypi
173+
url: https://pypi.org/p/numpy
174+
permissions:
175+
id-token: write
176+
steps:
177+
# TODO: retrieve your distributions here
178+
179+
- name: Publish package distributions to PyPI
180+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
181+
with:
182+
print-hash: true
183+
184+
pypi-publish:
185+
name: Upload release to PyPI
186+
needs: [build_wheels, build_sdist]
187+
runs-on: ubuntu-latest
188+
environment:
189+
name: pypi
190+
url: https://pypi.org/p/numpy
191+
permissions:
192+
id-token: write
193+
steps:
194+
# TODO: retrieve your distributions here
195+
196+
- name: Publish package distributions to PyPI
197+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
198+
with:
199+
print-hash: true

0 commit comments

Comments
 (0)