File tree Expand file tree Collapse file tree 2 files changed +79
-40
lines changed Expand file tree Collapse file tree 2 files changed +79
-40
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ pull_request :
5+ release :
6+ types :
7+ - published
8+
9+ jobs :
10+ build_wheels :
11+ name : Build wheels on ${{ matrix.os }}
12+ runs-on : ${{ matrix.os }}
13+ strategy :
14+ matrix :
15+ os : [ubuntu-18.04, windows-latest, macos-latest]
16+
17+ steps :
18+ - uses : actions/checkout@v2
19+ # Include all history and tags
20+ with :
21+ fetch-depth : 0
22+
23+ - uses : actions/setup-python@v2
24+ name : Install Python
25+ with :
26+ python-version : ' 3.8'
27+
28+ - name : Install cibuildwheel
29+ run : |
30+ python -m pip install cibuildwheel==1.5.5
31+
32+ - name : Build wheels
33+ run : |
34+ python -m cibuildwheel --output-dir wheelhouse
35+ env :
36+ CIBW_SKIP : pp* cp27-win*
37+
38+ - uses : actions/upload-artifact@v2
39+ with :
40+ path : ./wheelhouse/*.whl
41+
42+ build_sdist :
43+ name : Build source distribution
44+ runs-on : ubuntu-latest
45+ steps :
46+ - uses : actions/checkout@v2
47+ # Include all history and tags
48+ with :
49+ fetch-depth : 0
50+
51+ - uses : actions/setup-python@v2
52+ name : Install Python
53+ with :
54+ python-version : ' 3.7'
55+
56+ - name : Build sdist
57+ run : |
58+ pip install cython
59+ python setup.py sdist
60+
61+ - uses : actions/upload-artifact@v2
62+ with :
63+ path : dist/*.tar.gz
64+
65+ upload_pypi :
66+ needs : [build_wheels, build_sdist]
67+ runs-on : ubuntu-latest
68+ if : github.event_name == 'release' && github.event.action == 'published'
69+ steps :
70+ - uses : actions/download-artifact@v2
71+ with :
72+ name : artifact
73+ path : dist
74+
75+ - uses : pypa/gh-action-pypi-publish@master
76+ with :
77+ user : __token__
78+ password : ${{ secrets.PYPI_TOKEN }}
79+ # To test: repository_url: https://test.pypi.org/legacy/
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments