-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (41 loc) · 1.42 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
43
on: [push]
name: CI build
jobs:
build:
name: Build for ${{ matrix.platform.os_name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os_name: Linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: dioxionary
asset_name: dioxionary-linux-amd64
toolchain:
- stable
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- run: sudo apt-get update && sudo apt-get install -y libssl-dev libsqlite3-dev libasound2-dev
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--release"
strip: true
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.platform.asset_name }}
path: target/${{ matrix.platform.target }}/release/${{ matrix.platform.artifact_name }}
- name: Release
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.platform.target }}/release/${{ matrix.platform.artifact_name }}
asset_name: ${{ matrix.platform.asset_name }}
tag: ${{ github.ref }}