File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Upload Python Package
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ release-build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout repo
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : " 3.9"
22+
23+ - name : Install build tools
24+ env :
25+ SB_API_KEY : ${{ secrets.SB_API_KEY }}
26+ run : |
27+ export PYPI_REGISTRY=https://$SB_API_KEY.pypimirror.stablebuild.com/2023-12-27/
28+ curl https://$SB_API_KEY.httpcache.stablebuild.com/pip-cache-20231228/https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
29+ python get-pip.py -i $PYPI_REGISTRY "pip==21.3.1" && \
30+ rm get-pip.py
31+ python -m pip install -i https://$SB_API_KEY.pypimirror.stablebuild.com/2023-01-30/ twine
32+
33+ - name : Build package
34+ rm -rf build/
35+ rm -rf dist/
36+ python setup.py sdist
37+
38+ - name : Publish package
39+ env :
40+ TWINE_USERNAME : __token__
41+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
42+ run : |
43+ python -m twine upload dist/*
You can’t perform that action at this time.
0 commit comments