Skip to content

Commit f7d6aa7

Browse files
authored
Create python-publish.yml
1 parent 3cc442e commit f7d6aa7

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/python-publish.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
env:
15+
TWINE_USERNAME: "__token__"
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: '3.x'
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install setuptools wheel twine tox
26+
- name: Build package
27+
run: python setup.py sdist bdist_wheel
28+
- name: Publish package
29+
env:
30+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
31+
run: twine upload dist/*

0 commit comments

Comments
 (0)