Skip to content

Commit 84f5738

Browse files
Add deployment workflow
1 parent b34e3d7 commit 84f5738

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/push_to_pypi.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Push package to pypi
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- release
9+
10+
env:
11+
PYTHON_VERSION: "3.9"
12+
13+
jobs:
14+
push_to_pypi:
15+
if: github.event.pull_request.merged
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Setup python
21+
uses: actions/setup-python@v3
22+
with:
23+
python-version: ${{ env.PYTHON_VERSION }}
24+
25+
- name: Print information
26+
run: |
27+
echo "python version $(python --version) running"
28+
echo "pip version $(pip --version) running"
29+
30+
- name: Build
31+
run: |
32+
pip install wheel
33+
python setup.py sdist bdist_wheel
34+
35+
- name: Deploy
36+
env:
37+
PYPI_USERNAME: "${{ secrets.PYPI_USERNAME }}"
38+
PYPI_PASSWORD: "${{ secrets.PYPI_PASSWORD }}"
39+
run: |
40+
sh deploy.sh

0 commit comments

Comments
 (0)