Skip to content

Commit 5d93be6

Browse files
committed
Publish to PyPI with GitHub Actions
1 parent 1b51d93 commit 5d93be6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/pypi.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: pypi-publish
2+
on:
3+
push:
4+
branches: [ master ]
5+
tags:
6+
- 'v*'
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
if: startsWith(github.ref, 'refs/tags/v')
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.6
17+
- name: Install dependencies
18+
run: |
19+
pip install -e .
20+
- name: Build package
21+
run: |
22+
pip install --upgrade build
23+
python -m build
24+
- name: Publish package
25+
uses: pypa/gh-action-pypi-publish@release/v1
26+
with:
27+
user: __token__
28+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)