Skip to content

Commit 426b7ea

Browse files
authored
Create python-publish.yml
1 parent c084f2e commit 426b7ea

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Upload Python Package
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
release-build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.8"
19+
20+
- name: Install dependencies
21+
run: |
22+
pip3 install -r requirements.txt
23+
pip3 install pytest
24+
pip3 install twine
25+
26+
- name: Build and Test
27+
run: |
28+
python3 setup.py build
29+
pytest
30+
31+
- name: Publish to PyPI
32+
run: |
33+
python3 setup.py sdist bdist_wheel &> package_setup.log
34+
curl --connect-timeout 10 -kI https://test.pypi.org
35+
twine upload -u ${{ secrets.USER }} -p ${{ secrets.PASS }} 'dist/*'

0 commit comments

Comments
 (0)