-
Notifications
You must be signed in to change notification settings - Fork 13
104 lines (93 loc) · 2.71 KB
/
Copy pathcd.yml
File metadata and controls
104 lines (93 loc) · 2.71 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
99
100
101
102
103
104
name: Build and upload to PyPI
on:
workflow_dispatch:
release:
types:
- published
jobs:
build_sdist:
name: Build sdist for am4utils
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
working-directory: ./
run: pipx run build --sdist
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist/*.tar.gz
build_wheels:
name: Build wheels for py${{ matrix.python }}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python: 39
platform_id: "manylinux_x86_64"
- os: ubuntu-latest
python: 310
platform_id: "manylinux_x86_64"
- os: ubuntu-latest
python: 311
platform_id: "manylinux_x86_64"
- os: ubuntu-latest
python: 312
platform_id: "manylinux_x86_64"
- os: ubuntu-latest
python: 313
platform_id: "manylinux_x86_64"
- os: macos-latest
python: 39
platform_id: "macosx_x86_64"
- os: macos-latest
python: 310
platform_id: "macosx_x86_64"
- os: macos-latest
python: 311
platform_id: "macosx_x86_64"
- os: macos-latest
python: 39
platform_id: "macosx_arm64"
- os: macos-latest
python: 310
platform_id: "macosx_arm64"
- os: macos-latest
python: 311
platform_id: "macosx_arm64"
- os: macos-latest
python: 312
platform_id: "macosx_arm64"
- os: macos-latest
python: 313
platform_id: "macosx_arm64"
steps:
- uses: actions/checkout@v4
- name: build and test wheels
working-directory: ./
env:
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux_2_28_x86_64"
CIBW_ARCHS: all
CIBW_TEST_SKIP: "*"
MACOSX_DEPLOYMENT_TARGET: 10.15
run: pipx run cibuildwheel --output-dir wheelhouse
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: ./wheelhouse/*.whl
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
id-token: write # mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1