Skip to content

Commit 140d499

Browse files
authored
Create publish.yml
1 parent 9f1530a commit 140d499

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
release:
8+
types: [created]
9+
workflow_dispatch:
10+
11+
jobs:
12+
deploy:
13+
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
max-parallel: 2
17+
matrix:
18+
os: [ubuntu-latest]
19+
python-version: [3.8]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up Python
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -U setuptools wheel twine
31+
- name: Build and publish
32+
env:
33+
TWINE_USERNAME: __token__
34+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
35+
run: |
36+
python setup.py sdist bdist_wheel
37+
ls ./dist/*.whl
38+
twine upload dist/*.gz
39+
twine upload dist/*.whl

0 commit comments

Comments
 (0)