-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.37 KB
/
release.yml
File metadata and controls
49 lines (39 loc) · 1.37 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
name: Release
on:
release:
types: [created]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_NET_GIT_FETCH_WITH_CLI: true
jobs:
build:
name: Build release binary
# Self-hosted macOS runner required for CommonCrypto FFI
runs-on: spiceai-macos
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
- name: Build release binary
run: cargo build --release --locked --bin spiceio
- name: Package binary
run: |
cd target/release
tar czf spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz spiceio
shasum -a 256 spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz > spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz.sha256
- name: Upload release assets
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload "${{ github.event.release.tag_name }}" --clobber \
target/release/spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz \
target/release/spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz.sha256