-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.39 KB
/
ci-wheels.yml
File metadata and controls
53 lines (45 loc) · 1.39 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
name: "CI: Build Wheels"
on:
workflow_dispatch:
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.archs }} for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Select architecture for MacOS
run: |
echo 'CIBW_ARCHS=x86_64 universal2' >> $GITHUB_ENV
if: runner.os == 'macOS'
- uses: pypa/cibuildwheel@v2.22.0
name: Build wheels
env:
# cibuildwheel will build wheel once and test it for each CPython version
CIBW_BUILD: "cp312-* cp313-* cp311-* cp310-*"
# musllinux is not supported since musl does not export _timezone
CIBW_SKIP: "*musllinux*"
CIBW_BUILD_VERBOSITY: 1
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
upload_all:
needs: [build_wheels]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v5
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@v1.12.4