Skip to content

Commit

Permalink
Upload to test PyPI in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nya3jp committed Apr 4, 2022
1 parent e019f7c commit 9badfa9
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:

- uses: actions/upload-artifact@v2
with:
name: sdist
path: ./dist/*.tar.gz

build_wheels:
Expand All @@ -65,4 +66,34 @@ jobs:

- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./wheelhouse/*.whl

upload_pypi:
name: Upload to PyPI
runs-on: ubuntu-20.04
needs:
- build_sdist
- build_wheels
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')

steps:
- name: Download artifacts (sdist)
uses: actions/download-artifact@v3
with:
name: sdist
path: dist

- name: Download artifacts (wheels)
uses: actions/download-artifact@v3
with:
name: wheels
path: dist

- name: Publish package to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: dist
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

0 comments on commit 9badfa9

Please sign in to comment.