-
Notifications
You must be signed in to change notification settings - Fork 27
92 lines (83 loc) · 2.22 KB
/
release_pypi.yaml
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
name: Release PyPi
on:
workflow_dispatch:
# release:
# types:
# - created
pull_request:
branches: [main]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# FIXME: rather do one job by OS
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# - name: Set up Rust
# uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
- name: Build wheels with Maturin
uses: PyO3/maturin-action@v1
with:
command: build
args: --release --out dist # --features python-bindings
- uses: actions/upload-artifact@v4
with:
path: dist/*.whl
name: wheels-${{ matrix.os }}
- uses: actions/download-artifact@v4
with:
name: sdist
path: dist
- run: ls -R dist
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build sdist with Maturin
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
name: sdist
- uses: actions/download-artifact@v4
with:
name: sdist
path: dist
- run: ls -R dist
# release:
# name: Release to PyPI
# needs: [build_wheels, build_sdist]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v4
# with:
# pattern: wheels-*
# merge-multiple: true
# path: dist
# - uses: actions/download-artifact@v4
# with:
# name: sdist
# path: dist
# - run: ls -R dist
# - name: Publish to PyPI
# uses: pypa/[email protected]
# with:
# user: __token__
# password: ${{ secrets.PYPI_SECRET }}