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: Release
on:
push:
tags:
- 'v*'
env:
CARGO_TERM_COLOR: always
jobs:
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
if: github.repository_owner == 'mazhewitt'
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/cache
~/.cargo/registry
target/
key: ubuntu-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Verify tests pass
run: cargo test --verbose
- name: Publish to crates.io
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: publish
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release v${{ steps.version.outputs.VERSION }}
body: |
# candle-coreml v${{ steps.version.outputs.VERSION }}
CoreML inference engine for Candle tensors on macOS/iOS.
## Changes
See the commit history for detailed changes in this release.
## Installation
```bash
cargo add candle-coreml
```
## Documentation
- [crates.io](https://crates.io/crates/candle-coreml)
- [docs.rs](https://docs.rs/candle-coreml)
draft: false
prerelease: false