Skip to content

Commit 1ae3322

Browse files
committed
ci: add pypi publish job
1 parent 6e4c74a commit 1ae3322

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/ci.yml

+20
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: CI
33
on:
44
push:
55
branches: ["master"]
6+
tags:
7+
- "[0-9]+.[0-9]+.[0-9]+"
68
pull_request:
79

810
jobs:
@@ -39,3 +41,21 @@ jobs:
3941
run: |
4042
python -m tox
4143
- uses: codecov/codecov-action@v1
44+
deploy:
45+
runs-on: ubuntu-latest
46+
needs:
47+
- pre-commit
48+
- tests
49+
if: startsWith(github.ref, 'refs/tags')
50+
steps:
51+
- uses: actions/checkout@v2
52+
- uses: actions/setup-python@v2
53+
- name: Install pypa/build
54+
run: python -m pip install build
55+
- name: Build a binary wheel and a source tarball
56+
run: python -m build --sdist --wheel --outdir dist/
57+
- name: Publish distribution 📦 to PyPI
58+
uses: pypa/gh-action-pypi-publish@master
59+
with:
60+
user: __token__
61+
password: ${{ secrets.pypi_token }}

0 commit comments

Comments
 (0)