-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.yml
More file actions
33 lines (26 loc) · 935 Bytes
/
build.yml
File metadata and controls
33 lines (26 loc) · 935 Bytes
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
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.os == 'windows-latest' && 'x86_64-pc-windows-gnu' || matrix.os == 'macos-latest' && 'x86_64-apple-darwin' || 'x86_64-unknown-linux-gnu' }}
- name: Build
run: cargo build --release
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os == 'windows-latest' && 'your_binary_name-windows-amd64.exe' || matrix.os == 'macos-latest' && 'your_binary_name-macos-amd64' || 'your_binary_name-linux-amd64' }}
path: target/release/your_binary_name${{ matrix.os == 'windows-latest' && '.exe' || '' }}