Skip to content

Commit 28ae6ec

Browse files
committed
Add GitHub actions workflow to publish to PyPI
1 parent 4059862 commit 28ae6ec

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Upload to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
container:
11+
image: python:3.6
12+
env:
13+
PYTHONDONTWRITEBYTECODE: TRUE
14+
PYTHONUNBUFFERED: TRUE
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Install dependencies
19+
run: >-
20+
python -m pip install --upgrade --no-cache-dir
21+
pip wheel pep517 twine
22+
- name: Package project
23+
run: python -m pep517.build .
24+
- name: Upload distributions
25+
env:
26+
TWINE_USERNAME: __token__
27+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
28+
run: twine upload dist/*

0 commit comments

Comments
 (0)