Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 8a1d950

Browse files
Create publish.yml
0 parents  commit 8a1d950

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Python Package
2+
3+
on:
4+
release:
5+
types: [created, updated]
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install setuptools wheel twine
24+
25+
- name: Build
26+
run: |
27+
python setup.py sdist bdist_wheel
28+
29+
- name: Publish
30+
env:
31+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
32+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
33+
run: |
34+
twine upload dist/*

0 commit comments

Comments
 (0)