Skip to content

Commit 81b258e

Browse files
authored
Create Python Publish Action
1 parent 8e13e6a commit 81b258e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/python-publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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: [workflow_dispatch]
7+
8+
jobs:
9+
test_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+
env:
25+
TWINE_USERNAME: __token__
26+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
27+
run: |
28+
python setup.py sdist bdist_wheel
29+
twine upload --repository testpypi dist/*

0 commit comments

Comments
 (0)