v0.2.1 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- 'v*' | |
name: Create Release | |
jobs: | |
build: | |
name: Build [${{ matrix.config.name }}] | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { name: Linux (x64), os: ubuntu-latest, suffix: linux-x64, target: "x86_64-unknown-linux-gnu" } | |
- { name: Linux (ARM), os: ubuntu-latest, suffix: linux-arm, target: "aarch64-unknown-linux-gnu" } | |
- { name: MacOS (x64), os: macos-latest, suffix: macos-x64, target: "x86_64-apple-darwin" } | |
- { name: MacOS (ARM), os: macos-latest, suffix: macos-arm, target: "aarch64-apple-darwin" } | |
- { name: Windows (x64), os: windows-latest, suffix: win-x64, target: "x86_64-pc-windows-msvc" } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.config.target }} | |
- name: Setup aarch64 | |
if: matrix.config.target == 'aarch64-unknown-linux-gnu' | |
run: | | |
sudo apt update | |
sudo apt install gcc-aarch64-linux-gnu | |
echo "[target.aarch64-unknown-linux-gnu]" >> ~/.cargo/config | |
echo "linker = \"aarch64-linux-gnu-gcc\"" >> ~/.cargo/config | |
- name: Build OwOverlay (Release) | |
run: cargo build --release | |
- uses: actions/upload-artifact@v4 | |
if: matrix.config.target == 'x86_64-pc-windows-msvc' | |
with: | |
name: owoverlay-${{ matrix.config.suffix }} | |
path: target/release/owoverlay.exe | |
compression-level: 9 | |
- uses: actions/upload-artifact@v4 | |
if: matrix.config.target != 'x86_64-pc-windows-msvc' | |
with: | |
name: owoverlay-${{ matrix.config.suffix }} | |
path: target/release/owoverlay | |
compression-level: 9 |