-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (68 loc) · 2.14 KB
/
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
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
name: Build wheels
on:
push:
tags:
- "v*.*.*"
jobs:
build_wheels:
name: Build wheels for ${{ matrix.platforms[1] }} with Python ${{ matrix.python }}
runs-on: ${{ matrix.platforms[0] }}
strategy:
matrix:
platforms:
- [ubuntu-20.04, manylinux_x86_64]
- [ubuntu-20.04, musllinux_x86_64]
- [macos-13, macosx_x86_64]
- [macos-14, macosx_arm64]
- [windows-2019, win_amd64]
- [windows-2019, win32]
python: ["cp39", "cp310", "cp311", "cp312"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Build wheels
uses: pypa/cibuildwheel@v2.18.1
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platforms[1] }}
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.python }}-${{ matrix.platforms[1] }}
path: ./wheelhouse/*.whl
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install twine
- name: Upload wheels to PyPI
if: success()
run: |
python -m twine upload --repository testpypi wheelhouse/*.whl
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build source distribution
run: python3 -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: ./dist/*.tar.gz
- name: Upload source distribution to PyPI
if: success()
run: |
python -m twine upload --repository testpypi dist/*.tar.gz
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}