forked from Echo-Mirror-Butler/echomirror-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (63 loc) · 1.85 KB
/
Copy pathpython-publish.yml
File metadata and controls
72 lines (63 loc) · 1.85 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
name: Publish Python SDK to PyPI
on:
workflow_dispatch:
inputs:
note:
description: "Optional note for this run (e.g. release version) — informational only"
required: false
jobs:
build-wheels:
name: build wheels (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
working-directory: crates/echomirror-python
target: ${{ matrix.os == 'macos-latest' && 'universal2-apple-darwin' || '' }}
args: --release --out dist -i 3.9 3.10 3.11 3.12
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: crates/echomirror-python/dist
build-sdist:
name: build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
working-directory: crates/echomirror-python
command: sdist
args: --out dist
- uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: crates/echomirror-python/dist
publish:
name: publish to PyPI
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
environment: pypi
steps:
- name: Download all wheels
uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing dist/*
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}