Skip to content

Commit

Permalink
Add test PyPI to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
johnveitch committed Jul 11, 2024
1 parent 5e68b08 commit 0434daf
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,28 @@ jobs:
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi_test:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/cpnest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
#if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- name: Upload release to PyPI Test
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

upload_pypi:
needs: [build_wheels, build_sdist]
Expand Down

0 comments on commit 0434daf

Please sign in to comment.