-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (62 loc) · 1.99 KB
/
release.yml
File metadata and controls
76 lines (62 loc) · 1.99 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
name: Release
on:
push:
tags:
- 'v*' # Trigger on version tags such as v1.0.0
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install cibuildwheel==2.*
- name: Build wheels with cibuildwheel
env:
CIBW_TEST_COMMAND: python {package}/test_arraydeque.py
run: cibuildwheel --output-dir wheelhouse .
- name: Upload built wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
publish:
# Wait for all platforms to build, then publish wheels and a source distribution.
needs: build_wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download wheels (Ubuntu)
uses: actions/download-artifact@v4
with:
name: wheels-ubuntu-latest
path: wheels
- name: Download wheels (macOS)
uses: actions/download-artifact@v4
with:
name: wheels-macos-latest
path: wheels
- name: Download wheels (Windows)
uses: actions/download-artifact@v4
with:
name: wheels-windows-latest
path: wheels
- name: Build source distribution
run: |
python -m pip install --upgrade pip setuptools wheel build twine==6.0.* pkginfo
python -m build --sdist --outdir sdist
- name: Publish wheels and source distribution to PyPI
run: |
twine upload wheels/*.whl sdist/*.tar.gz
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}