File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - ' **'
7+ tags :
8+ - ' **'
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : ' 3.9'
22+
23+ - name : Install build dependencies
24+ run : pip install setuptools wheel
25+
26+ - name : Build package
27+ run : python setup.py sdist bdist_wheel
28+
29+ - name : Upload dist as artifact
30+ uses : actions/upload-artifact@v4
31+ with :
32+ name : dist
33+ path : dist/
34+
35+ deploy :
36+ runs-on : ubuntu-latest
37+ needs : build
38+ if : startsWith(github.ref, 'refs/tags/') && contains('0123456789', github.ref[10])
39+
40+ steps :
41+ - name : Checkout code
42+ uses : actions/checkout@v4
43+
44+ - name : Download artifact
45+ uses : actions/download-artifact@v4
46+ with :
47+ name : dist
48+ path : dist/
49+
50+ - name : Set up Python
51+ uses : actions/setup-python@v5
52+ with :
53+ python-version : ' 3.9'
54+
55+ - name : Install twine
56+ run : pip install twine
57+
58+ - name : Upload to PyPI
59+ env :
60+ TWINE_USERNAME : ${{ secrets.PYPI_USER }}
61+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
62+ run : twine upload dist/*
You can’t perform that action at this time.
0 commit comments