Skip to content

Commit b9e948f

Browse files
committed
WIP: add trusted publishing to PyPI and TestPyPI
1 parent bb8a6d6 commit b9e948f

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
@@ -159,3 +159,38 @@ jobs:
159159
with:
160160
name: sdist
161161
path: ./dist/*
162+
163+
testpypi-publish:
164+
name: Upload release to TestPyPI
165+
if: # TODO - add a release True/False? and on `main`?
166+
needs: [build_wheels, build_sdist]
167+
runs-on: ubuntu-latest
168+
environment:
169+
name: pypi
170+
url: https://pypi.org/p/numpy
171+
permissions:
172+
id-token: write
173+
steps:
174+
# TODO: retrieve your distributions here
175+
176+
- name: Publish package distributions to PyPI
177+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
178+
with:
179+
print-hash: true
180+
181+
pypi-publish:
182+
name: Upload release to PyPI
183+
needs: [build_wheels, build_sdist]
184+
runs-on: ubuntu-latest
185+
environment:
186+
name: pypi
187+
url: https://pypi.org/p/numpy
188+
permissions:
189+
id-token: write
190+
steps:
191+
# TODO: retrieve your distributions here
192+
193+
- name: Publish package distributions to PyPI
194+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
195+
with:
196+
print-hash: true

0 commit comments

Comments
 (0)