-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (83 loc) · 2.25 KB
/
release.yml
File metadata and controls
98 lines (83 loc) · 2.25 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
95
96
97
98
name: release
on:
workflow_run:
workflows: [tests]
branches: [master]
types: [completed]
jobs:
setup:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@main
with:
fetch-depth: 2
- name: Prepare to build
run: pip install build
- name: Build sdist
run: python -m build --sdist
env:
HTTP_ROUTER_NO_EXTENSIONS: "1"
- uses: actions/upload-artifact@main
with:
name: dist
path: dist/*.tar.*
build:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
cibw_arch: ["auto64", "aarch64", "universal2"]
cibw_python:
- "cp310"
- "cp311"
- "cp312"
- "cp313"
- "cp314"
exclude:
- os: macos-latest
cibw_arch: aarch64
- os: ubuntu-latest
cibw_arch: universal2
- os: windows-latest
cibw_arch: universal2
- os: windows-latest
cibw_arch: aarch64
runs-on: ${{ matrix.os }}
needs: setup
defaults:
run:
shell: bash
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
steps:
- uses: actions/checkout@main
with:
fetch-depth: 5
- name: Set up QEMU
if: matrix.os == 'ubuntu-latest' && matrix.cibw_arch == 'aarch64'
uses: docker/setup-qemu-action@v1
with:
platforms: arm64
- uses: pypa/cibuildwheel@main
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: ${{ matrix.cibw_python }}-*
CIBW_ARCHS: ${{ matrix.cibw_arch }}
- uses: actions/upload-artifact@main
with:
name: wheel-${{ matrix.os }}-${{ matrix.cibw_arch }}-${{ matrix.cibw_python }}
path: wheelhouse/*.whl
publish:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download a distribution artifact pt.1
uses: actions/download-artifact@main
with:
path: dist
merge-multiple: true
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI }}