Skip to content

Commit f97de80

Browse files
committed
Migrate PyPI release to GitHub Actions
1 parent 0c36187 commit f97de80

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

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

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish to PyPI
2+
3+
on: push
4+
5+
jobs:
6+
publish-pypi:
7+
name: Publish to PyPI
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@master
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.8
18+
19+
- name: Install dependencies
20+
run: pip install wheel
21+
22+
- name: Build source distributions and wheels
23+
run: python setup.py bdist_wheel
24+
25+
- name: Publish to Test PyPI
26+
uses: pypa/gh-action-pypi-publish@master
27+
with:
28+
password: ${{ secrets.test_pypi_password }}
29+
repository_url: https://test.pypi.org/legacy/
30+
31+
- name: Publish to PyPI
32+
if: startsWith(github.ref, 'refs/tags')
33+
uses: pypa/gh-action-pypi-publish@master
34+
with:
35+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)