Skip to content

Commit d1702e9

Browse files
committed
release action
1 parent 7833655 commit d1702e9

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, windows-latest, macos-latest]
13+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- name: Build wheels
22+
uses: PyO3/maturin-action@v1
23+
with:
24+
command: build
25+
args: --release --out dist
26+
27+
- name: Upload wheels
28+
uses: actions/upload-artifact@v3
29+
with:
30+
name: wheels
31+
path: dist
32+
33+
publish:
34+
needs: [build]
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/download-artifact@v3
38+
with:
39+
name: wheels
40+
path: dist
41+
42+
- name: Publish to PyPI
43+
uses: PyO3/maturin-action@v1
44+
env:
45+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
46+
with:
47+
command: upload
48+
args: --skip-existing dist/*

0 commit comments

Comments
 (0)