-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 940 Bytes
/
artifact.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
name: Artifact build
on:
push:
branches:
- develop
jobs:
build:
strategy:
matrix:
include:
- target: x86_64-pc-windows-msvc
os: windows-latest
binary: tcli.exe
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
binary: tcli
name: Build artifacts for ${{ matrix.target }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Restore cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --target ${{ matrix.target }} --release
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: tcli-${{ matrix.target }}
path: ./target/${{ matrix.target }}/release/${{ matrix.binary }}