forked from rushter/selectolax
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (82 loc) · 2.45 KB
/
make_release.yml
File metadata and controls
94 lines (82 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build and upload to PyPI
on:
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{matrix.arch}} for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 450
env:
CIBW_SKIP: "cp27-* cp34-* cp35-* pp27-* cp36-musllinux_aarch64 pp37-manylinux_aarch64 cp36-manylinux_aarch64 pp3*"
CIBW_BEFORE_BUILD: "pip install Cython==0.29.36"
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
arch: [auto]
include:
- os: ubuntu-20.04
arch: aarch64
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- uses: docker/setup-qemu-action@v2
if: ${{ matrix.arch == 'aarch64' }}
name: Set up QEMU
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.11.4 Cython==0.29.36
- name: Build wheels
env:
CIBW_ARCHS_MACOS: x86_64 universal2
CIBW_ARCHS_LINUX: ${{matrix.arch}}
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
retention-days: 1
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
timeout-minutes: 40
env:
CIBW_SKIP: "cp27-* cp34-* pp27-* cp35-*"
CIBW_BEFORE_BUILD: "pip install Cython==0.29.36"
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- name: Build sdist
run: |
pip install Cython==0.29.36
python setup.py build_ext --inplace --cython
python setup.py sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
retention-days: 1
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/