Skip to content

powershell

powershell #17

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 ($env:RUNNER_OS -eq "Windows") {
cargo build --release --target x86_64-pc-windows-gnu
zip -r earendil-windows.zip target/x86_64-pc-windows-gnu/release/earendil.exe
}
elseif ($env:RUNNER_OS -eq "macOS") {
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 {
sudo apt-get update
sudo apt-get install -y musl-tools
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
}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Earendil artifacts
path: |
earendil-windows.zip
earendil-macos.zip
earendil-linux.zip