Skip to content

Commit 3057831

Browse files
authored
Add github action workflow to auto-publish to PyPI (#26)
1 parent 58cdf50 commit 3057831

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/publish_pypi.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- '20*'
7+
8+
jobs:
9+
build_and_deploy:
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
shell: bash -l {0}
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.8"
23+
- name: Install build dependencies
24+
run: python -m pip install setuptools wheel
25+
- name: Build wheel
26+
run: python setup.py sdist bdist_wheel
27+
- name: Publish to PyPI
28+
uses: pypa/gh-action-pypi-publish@master
29+
with:
30+
user: __token__
31+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)