Skip to content

Commit 3224f0e

Browse files
authored
Add flow for package publishing.
1 parent 247bc72 commit 3224f0e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish distributions to PyPI and TestPyPI
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
7+
jobs:
8+
build-and-publish:
9+
name: Build and publish distributions to PyPI and TestPyPI
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Set up Python 3.7
14+
uses: actions/setup-python@v1
15+
with:
16+
version: 3.7
17+
- name: Install wheel
18+
run: >-
19+
pip install wheel
20+
- name: Build
21+
run: >-
22+
python3 setup.py sdist bdist_wheel
23+
- name: Publish distribution to PyPI
24+
uses: pypa/gh-action-pypi-publish@master
25+
with:
26+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)