-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.33 KB
/
ci.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
name: CI
on:
push:
branches:
- action
tags:
- '*'
jobs:
build_and_release:
name: sharun
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
target: x86_64-unknown-linux-musl
- name: Install deps
run: >
sudo bash -c 'apt update && apt install upx binutils -y';
rustup component add rust-src --toolchain nightly;
cargo install cross;
- name: Build x86_64
run: >
cargo clean;
cargo build --release;
mv target/x86_64-unknown-linux-musl/release/sharun sharun-x86_64;
- name: Build aarch64
run: >
cargo clean;
cross build --release --target aarch64-unknown-linux-musl;
mv target/aarch64-unknown-linux-musl/release/sharun sharun-aarch64;
- name: Strip
run: >
strip -s -R .comment -R .gnu.version --strip-unneeded sharun-x86_64;
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: sharun*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}