-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.56 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
63
64
# Origin config by @Kilerd
name: Build Release
on:
push:
branches: [ master ]
jobs:
release:
name: Pre-Release on ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
platform: [linux_glibc-x86_64, linux_musl-x86_64]
include:
- platform: linux_glibc-x86_64
target: x86_64-unknown-linux-gnu
os: ubuntu-latest
bin: fibonacci
- platform: linux_musl-x86_64
target: x86_64-unknown-linux-musl
os: ubuntu-latest
bin: fibonacci
steps:
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.target }}
toolchain: nightly
override: true
- name: Checkout code
uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libgmp-dev pkg-config
- name: Run code build
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: build
args: --release --target ${{ matrix.target }}
- name: Prepare assets
shell: bash
run: |
mv target/${{ matrix.target }}/release/${{ matrix.bin }} .
tar -cvf ${{ matrix.target }}.tar LICENSE ${{ matrix.bin }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ matrix.target }}.tar
tag_name: v0.4.1
prerelease: true