Skip to content

Commit 2e7ae99

Browse files
authored
gh action support for publishing a release on pypi (#200)
add gh workflow steps to upload a package after release
1 parent 754d7ce commit 2e7ae99

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/manylinux.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,11 @@ jobs:
4141
cd ~
4242
${PYBIN}/py.test ${GITHUB_WORKSPACE}/python/tests/
4343
${PYBIN}/py.test ${GITHUB_WORKSPACE}/python/integration-tests/
44+
45+
- name: Publish package
46+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
47+
uses: pypa/gh-action-pypi-publish@master
48+
with:
49+
user: __token__
50+
password: ${{ secrets.pypi_password }}
51+
packages_dir: wheelhouse

.github/workflows/python.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,11 @@ jobs:
9898
cd python
9999
python -m pip install --user wheelhouse/*.whl
100100
python -m pytest tests
101+
102+
- name: Publish package
103+
if: runner.os == 'macOS' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
104+
uses: pypa/gh-action-pypi-publish@master
105+
with:
106+
user: __token__
107+
password: ${{ secrets.pypi_password }}
108+
packages_dir: wheelhouse

0 commit comments

Comments
 (0)