-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (49 loc) · 1.35 KB
/
build_wheels.yml
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
name: Build python wheels
on:
push:
tags: "v*"
pull_request:
tags: "v*"
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
pyver: [cp39, cp310, cp311, cp312]
steps:
- name: Checkout repos
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_BUILD: ${{matrix.pyver}}-*
CIBW_ARCHS_LINUX: auto64
CIBW_ARCHS_MACOS: auto64 universal2
CIBW_ARCHS_WINDOWS: auto64
CIBW_BUILD_FRONTEND: "build[uv]"
CIBW_TEST_SKIP: ${{matrix.pyver}}-*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: occpy-${{ matrix.os }}-${{ matrix.pyver }}
upload_all:
runs-on: ubuntu-latest
needs: build_wheels
environment:
name: pypi
url: https://pypi.org/p/occpy/
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
path: dist
pattern: occpy-*
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1