Skip to content

Commit 02f5144

Browse files
authored
Create cd_pypi.yml
1 parent 2efcb5c commit 02f5144

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/cd_pypi.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release Python Package to pypi
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.10'
19+
- name: Install dependencies
20+
run: pip install -r requirements.txt
21+
- name: Build package
22+
run: python setup.py sdist bdist_wheel
23+
- name: Publish package
24+
run: |
25+
pip install twine
26+
twine upload dist/*
27+
env:
28+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
29+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)