-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (42 loc) · 1.1 KB
/
build.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
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build project
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Strip binary (*nix)
if: matrix.os != 'windows-latest'
run: strip target/release/licensor
- name: Archive binary (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v1
with:
name: Linux
path: target/release/licensor
- name: Archive binary (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v1
with:
name: Windows
path: target/release/licensor.exe
- name: Archive binary (macOS)
if: matrix.os == 'macOS-latest'
uses: actions/upload-artifact@v1
with:
name: macOS
path: target/release/licensor