Skip to content

Commit 5f612a6

Browse files
authored
Merge pull request #25 from pygae/eric-wieser-patch-1
Add PyPI deployment via github actions
2 parents dd374a7 + 1690408 commit 5f612a6

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to PyPI
2+
3+
on: push
4+
5+
jobs:
6+
build-and-deploy:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Set up Python
11+
uses: actions/setup-python@v1
12+
with:
13+
python-version: '3.x'
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install setuptools wheel twine
18+
- name: Build
19+
run: |
20+
python setup.py sdist bdist_wheel
21+
# - name: Publish to Test PyPI (always)
22+
# uses: pypa/gh-action-pypi-publish@master
23+
# with:
24+
# user: __token__
25+
# password: ${{ secrets.test_pypi_password }}
26+
# repository_url: https://test.pypi.org/legacy/
27+
- name: Publish to PyPI (on tag)
28+
if: startsWith(github.event.ref, 'refs/tags/v')
29+
uses: pypa/gh-action-pypi-publish@master
30+
with:
31+
user: __token__
32+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)