Skip to content

Commit 6166e15

Browse files
committed
v0.0.2
1 parent 5a59ec5 commit 6166e15

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- action
7+
tags:
8+
- '*'
9+
10+
jobs:
11+
build_and_release:
12+
name: sharun
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Setup toolchain
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: nightly
24+
override: true
25+
target: x86_64-unknown-linux-musl
26+
27+
- name: Install deps
28+
run: >
29+
sudo bash -c 'apt update && apt install upx binutils -y';
30+
rustup component add rust-src --toolchain nightly;
31+
cargo install cross;
32+
33+
- name: Build x86_64
34+
run: >
35+
cargo clean;
36+
cargo build --release;
37+
mv target/x86_64-unknown-linux-musl/release/sharun sharun-x86_64;
38+
39+
- name: Build aarch64
40+
run: >
41+
cargo clean;
42+
cross build --release --target aarch64-unknown-linux-musl;
43+
mv target/aarch64-unknown-linux-musl/release/sharun sharun-aarch64;
44+
45+
- name: Strip
46+
run: >
47+
strip -s -R .comment -R .gnu.version --strip-unneeded sharun-x86_64;
48+
49+
- name: Release
50+
uses: softprops/action-gh-release@v1
51+
if: startsWith(github.ref, 'refs/tags/')
52+
with:
53+
files: sharun*
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)