-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.67 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
name: CI
on:
push:
branches:
- action
tags:
- '*'
jobs:
build_and_release:
name: ulexec
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: Build
run: >
sudo bash -c 'apt update && apt install upx binutils gcc-mingw-w64 musl-tools -y';
rustup component add rust-src --toolchain nightly;
cargo build --release;
strip -s -R .comment -R .gnu.version --strip-unneeded target/x86_64-unknown-linux-musl/release/ulexec;
upx --force -9 --best target/x86_64-unknown-linux-musl/release/ulexec -o target/x86_64-unknown-linux-musl/release/ulexec-upx;
cp target/x86_64-unknown-linux-musl/release/{ulexec,ulexec-upx} . ;
echo Windows;
rustup target add x86_64-pc-windows-gnu;
cargo build --release --target x86_64-pc-windows-gnu;
upx --force -9 --best target/x86_64-pc-windows-gnu/release/ulexec.exe -o target/x86_64-pc-windows-gnu/release/ulexec-upx.exe;
cp target/x86_64-pc-windows-gnu/release/{ulexec,ulexec-upx}.exe . ;
- name: Build archlinux package
uses: countstarlight/arch-makepkg-action@master
with:
scripts: "makepkg -fsCc --noconfirm"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ulexec*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}