-
Notifications
You must be signed in to change notification settings - Fork 7
56 lines (46 loc) · 1.23 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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- arm-unknown-linux-musleabihf
name: ${{ matrix.target }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
target: ${{ matrix.target }}
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
use-cross: true
args: --release --locked --target=${{ matrix.target }}
- name: Package
env:
PACKAGE_NAME: durt-${{ matrix.target }}
run: |
mkdir $PACKAGE_NAME
cp target/${{ matrix.target }}/release/durt $PACKAGE_NAME
cp LICENSE $PACKAGE_NAME
cp README.md $PACKAGE_NAME
tar caf $PACKAGE_NAME.tar.gz $PACKAGE_NAME
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: durt-${{ matrix.target }}.tar.gz