-
Notifications
You must be signed in to change notification settings - Fork 31
57 lines (48 loc) · 1.36 KB
/
release.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
name: Release
on:
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }} for ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
arch: [amd64, arm64]
include:
- os: ubuntu-latest
arch: arm64
target: aarch64-unknown-linux-gnu
- os: macos-latest
arch: arm64
target: aarch64-apple-darwin
exclude:
- os: windows-latest
arch: arm64
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install pkg-config libssl-dev
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Build Binary
run: |
cd rust
cargo build --release --target ${{ matrix.target }} --path crates/mesc_cli
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
rust/target/${{ matrix.target }}/release/mesc_cli*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}