File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
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 }}
You can’t perform that action at this time.
0 commit comments