Why am I making it easier to use BNPs? Because I'm too nice, or so I've been told. #44
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: | |
release: | |
types: [created] | |
workflow_dispatch: {} | |
jobs: | |
release: | |
name: Release ${{ matrix.platform.name }} | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
matrix: | |
platform: | |
- os: ubuntu-latest | |
name: linux | |
ext: ~ | |
- os: macos-14 | |
name: macos | |
ext: ~ | |
- os: windows-latest | |
name: windows | |
ext: .exe | |
- os: ubuntu-20.04 | |
name: steamdeck | |
ext: ~ | |
steps: | |
- uses: actions/checkout@master | |
- name: Cache crates | |
uses: actions/cache@v3 | |
with: | |
key: ${{ matrix.platform.os }}-cargo-cache | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
./target | |
- uses: SebRollen/[email protected] | |
id: read_toml | |
name: Get version | |
with: | |
file: 'Cargo.toml' | |
field: 'workspace.package.version' | |
- name: Install GTK | |
run: sudo apt update && sudo apt install libgtk-3-dev | |
if: contains(matrix.platform.os, 'ubuntu') | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Build | |
run: cargo build --release | |
env: | |
UPDATE_PLATFORM: ${{ matrix.platform.name }} | |
MACOSX_DEPLOYMENT_TARGET: 11.0 | |
- name: UPX compress binary | |
uses: crazy-max/[email protected] | |
if: contains(matrix.platform.os, 'ubuntu') | |
with: | |
version: v4.0.2 | |
args: --best --lzma | |
files: ./target/release/ukmm${{ matrix.platform.ext }} | |
- name: Archive release | |
uses: thedoctor0/zip-release@main | |
with: | |
type: zip | |
filename: ukmm-v${{ steps.read_toml.outputs.value }}-${{ matrix.platform.name }}.zip | |
path: ukmm${{ matrix.platform.ext }} | |
directory: target/release | |
- name: Upload release assets | |
uses: AButler/[email protected] | |
with: | |
files: ./target/release/*.zip | |
release-tag: 'v${{ steps.read_toml.outputs.value }}' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1 | |
CARGO_PROFILE_RELEASE_LTO: "true" | |
RUSTFLAGS: "-C link-arg=-s" | |
OPENSSL_STATIC: 1 |