Skip to content

Refactoring

Refactoring #16

Workflow file for this run

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: Install deps
run: |
sudo bash -c 'apt update && apt install upx binutils gcc-mingw-w64 musl-tools -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/ulexec ulexec-x86_64
- name: Build aarch64
run: |
cargo clean
cross build --release --target aarch64-unknown-linux-musl
mv target/aarch64-unknown-linux-musl/release/ulexec ulexec-aarch64
# https://github.com/aunali1/super-strip
- name: Strip
run: |
"${{ github.workspace }}/.github/sstrip" ulexec-*
- name: UPX
run: |
ls ulexec-*|xargs -I {} upx -9 --best {} -o {}-upx
- name: Build x86_64 windows
run: |
cargo clean
cargo build --release --target x86_64-pc-windows-gnu
mv target/x86_64-pc-windows-gnu/release/ulexec.exe ulexec-x86_64.exe
upx --force -9 --best ulexec-x86_64.exe -o ulexec-x86_64-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 }}