Skip to content

Commit b04ade3

Browse files
authored
Create python-publish.yml
1 parent 9b7fd6c commit b04ade3

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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: Build release distributions
21+
run: |
22+
pip3 install setuptools_rust
23+
python3 setup.py build test
24+
25+
- name: Publish to Test PyPI
26+
run: |
27+
python3 setup.py sdist bdist_wheel &> package_setup.log
28+
curl --connect-timeout 10 -kI https://test.pypi.org
29+
twine upload -u ${{ secrets.USER }} -p ${{ PASS }} -r testpypi 'dist/*'
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 ${{ PASS }} 'dist/*'
36+

0 commit comments

Comments
 (0)