Skip to content

Commit 8a36a4e

Browse files
authored
Added publish-to-pypi workflow (#9)
1 parent 88bc2f9 commit 8a36a4e

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Based on https://github.com/actions/starter-workflows/blob/main/ci/python-publish.yml
2+
name: Publish to Pypi
3+
4+
on:
5+
release:
6+
types: [created]
7+
8+
push:
9+
branches:
10+
- '*/fixed-publishing-to-pypi'
11+
12+
jobs:
13+
deploy:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: '3.x'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install setuptools wheel twine
29+
30+
- name: Build and publish
31+
env:
32+
TWINE_USERNAME: "__token__"
33+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
34+
run: |
35+
python setup.py sdist
36+
twine upload dist/*

0 commit comments

Comments
 (0)