-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (65 loc) · 1.83 KB
/
imspy-connector-publish.yml
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: Build and Publish Rust Binding
on:
release:
types: [published]
permissions:
contents: read
jobs:
build-and-publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
python-version: ['3.11']
include:
- os: ubuntu-latest
python-version: '3.11'
publish: true
- os: windows-latest
python-version: '3.11'
publish: true
- os: macos-13
python-version: '3.11'
publish: true
- os: macos-14
python-version: '3.11'
publish: true
target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Maturin
run: |
python -m pip install --upgrade pip
pip install maturin
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target || '' }}
- name: Change to imspy-connector directory
run: cd imspy_connector
- name: Clean Cargo Artifacts
run: |
cd imspy_connector
cargo clean
- name: Build with Maturin
run: |
cd imspy_connector
if [ -n "${{ matrix.target }}" ]; then
maturin build --release --target ${{ matrix.target }}
else
maturin build --release
fi
- name: Publish
if: matrix.publish
env:
MATURIN_PYPI_TOKEN: ${{ secrets.IMSPY_CONNECTOR_PYPI_API_TOKEN }}
run: |
cd imspy_connector
maturin publish --no-sdist