-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (56 loc) · 1.47 KB
/
rust.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
name: Build Rust
run-name: Rust building
on: [push, pull_request]
permissions:
contents: write
pull-requests: read
jobs:
builds:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Build
run: cargo build --release --features mdns
release:
if: ${{ contains(github.ref, 'tags/v') }}
needs: [builds]
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: login
run: cargo login ${{ secrets.CARGO_TOKEN }}
- name: publish proto
continue-on-error: true
run: cargo publish -p lebai-proto
- name: publish lebai_sdk
run: cargo publish -p lebai_sdk