Skip to content

Commit ccbf3a8

Browse files
authored
Create python-publish.yml (#45)
* Create python-publish.yml
1 parent c47556f commit ccbf3a8

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 workflow 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: push
7+
8+
jobs:
9+
deploy:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.x'
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install setuptools wheel twine
23+
- name: Build and publish
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
- name: Publish package
27+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
28+
uses: pypa/[email protected]
29+
with:
30+
user: __token__
31+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)