File tree Expand file tree Collapse file tree 2 files changed +81
-0
lines changed
Expand file tree Collapse file tree 2 files changed +81
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Test and deploy"
2+ on :
3+ push :
4+ branches :
5+ - main
6+ - development
7+ - deploy
8+ pull_request :
9+
10+ permissions :
11+ contents : read
12+ pull-requests : read
13+
14+ jobs :
15+ develop-matrix :
16+ strategy :
17+ matrix :
18+ os : [ubuntu-latest, windows-latest, macos-latest]
19+ python : ['3.9', '3.10', '3.11', '3.12']
20+ runs-on : ${{ matrix.os }}
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+
25+ - name : Setup python
26+ uses : actions/setup-python@v4
27+ with :
28+ python-version : ${{ matrix.python }}
29+
30+ - name : Install lib
31+ run : |
32+ pip install --upgrade pip
33+ pip install -e .
34+
35+ - name : Build wheel
36+ run : |
37+ pip install setuptools
38+ pip install wheel
39+ python setup.py bdist_wheel
40+
41+ - name : Archive build artifacts
42+ uses : actions/upload-artifact@v4
43+ with :
44+ name : build-artifacts-${{ matrix.os }}-${{ matrix.python }}
45+ path : dist
46+
47+ deploy :
48+ runs-on : ubuntu-latest
49+ needs : develop-matrix
50+ if : github.event_name == 'release' && github.event.action == 'created'
51+ steps :
52+ - name : Checkout
53+ uses : actions/checkout@v4
54+
55+ - name : Setup python
56+ uses : actions/setup-python@v4
57+ with :
58+ python-version : ' 3.9'
59+
60+ - name : Install twine
61+ run : |
62+ pip install --upgrade pip
63+ pip install twine
64+
65+ - name : Download build artifacts
66+ uses : actions/download-artifact@v4
67+ with :
68+ path : dist
69+ merge-multiple : true
70+
71+ - name : Inspect dist files
72+ run : |
73+ ls -R dist
74+
75+ - name : Upload to PyPI using twine
76+ run : |
77+ twine upload --skip-existing dist/*
78+ env :
79+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
80+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ __pycache__/
88# Distribution / packaging
99.Python
1010env /
11+ .venv /
1112build /
1213develop-eggs /
1314dist /
You can’t perform that action at this time.
0 commit comments