Skip to content

Commit 61f111e

Browse files
authored
Merge pull request #3 from prius/dev
Added pypi build via github actions
2 parents 0b90660 + 6af32ef commit 61f111e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Publish Python distribution package to PyPI and TestPyPI
3+
on: push
4+
jobs:
5+
build-n-publish:
6+
name: Build and publish Python distributions to PyPI and TestPyPI
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- name: Set up Python 3.9
11+
uses: actions/setup-python@v1
12+
with:
13+
python-version: 3.9
14+
- name: Build a binary wheel and a source tarball
15+
run: python setup.py sdist
16+
- name: Publish distribution package to Test PyPI
17+
uses: pypa/gh-action-pypi-publish@master
18+
with:
19+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
20+
repository_url: https://test.pypi.org/legacy/
21+
skip_existing: true
22+
- name: Publish distribution package to PyPI
23+
if: startsWith(github.ref, 'refs/tags')
24+
uses: pypa/gh-action-pypi-publish@master
25+
with:
26+
password: ${{ secrets.PYPI_API_TOKEN }}
27+
skip_existing: true

0 commit comments

Comments
 (0)