-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (52 loc) · 1.43 KB
/
Copy pathbuild-wheels.yml
File metadata and controls
63 lines (52 loc) · 1.43 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
name: Build and publish wheels
on:
push:
tags:
- "v*"
jobs:
build-wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install maturin
run: pip install maturin
- name: Build wheels
run: maturin build --release --out dist
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/
create-release:
name: Create Release
runs-on: ubuntu-latest
needs: build-wheels
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download all wheels
uses: actions/download-artifact@v3
with:
path: dist/
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: dist/*.whl
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}