Skip to content

Commit c5c20c2

Browse files
committed
add automatic publish of package
1 parent 380f690 commit c5c20c2

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.flake8

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
exclude = venv* .tox .env .eggs
2+
max-line-length = 120
3+

.github/workflows/publish.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
workflow_dispatch
8+
9+
jobs:
10+
deploy:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.x'
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install setuptools wheel twine
24+
- name: Build and publish
25+
env:
26+
TWINE_USERNAME: ${{ secrets.PIP_USERNAME }}
27+
TWINE_PASSWORD: ${{ secrets.PIP_PASSWORD }}
28+
run: |
29+
python setup.py sdist bdist_wheel
30+
twine upload dist/*

0 commit comments

Comments
 (0)