forked from dfinity/candid
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (59 loc) · 1.64 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
57
58
59
60
61
62
name: Release
on:
push:
tags:
- '*'
jobs:
publish:
name: Release for ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux64
artifact_name: target/release/didc
asset_name: didc-linux64
- os: macos-latest
name: macos
artifact_name: target/release/didc
asset_name: didc-macos
- os: ubuntu-latest
name: arm
artifact_name: target/arm-unknown-linux-gnueabihf/release/didc
asset_name: didc-arm32
steps:
- uses: actions/checkout@v2
- name: Install stable toolchain
if: matrix.name != 'arm'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install stable toolchain
if: matrix.name == 'arm'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: arm-unknown-linux-gnueabihf
- name: Build
if: matrix.name != 'arm'
run: cargo build --release --locked
- name: Cross build
if: matrix.name == 'arm'
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target arm-unknown-linux-gnueabihf --release --locked
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}