Skip to content

Workflow file for this run

name: Build Artifacts
on:
push:
branches:
- build
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Set up Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
- name: Check out code
uses: actions/checkout@v2
- name: Build and package
run: cargo build --release
- name: Generate artifacts
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
cargo build --release --target x86_64-pc-windows-gnu
zip -r earendil-windows.zip target/x86_64-pc-windows-gnu/release/earendil.exe
elif [[ "$RUNNER_OS" == "macOS" ]]; then
cargo build --release --target x86_64-apple-darwin
mkdir -p earendil.app/Contents/MacOS
cp target/x86_64-apple-darwin/release/earendil earendil.app/Contents/MacOS/earendil
zip -r earendil-macos.zip earendil.app
else
su && apt-get update && apt-get install -y musl-tools musl-gcc
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
zip -r earendil-linux.zip target/x86_64-unknown-linux-musl/release/earendil
fi
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Earendil artifacts
path: |
earendil-windows.zip
earendil-macos.zip
earendil-linux.zip