Skip to content

feat: improve build workflow #14

feat: improve build workflow

feat: improve build workflow #14

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup toolchain
run: |
rustup toolchain add --profile=minimal stable
rustup target add x86_64-pc-windows-msvc
rustup target add i686-pc-windows-msvc
- name: Rust caching
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
${{ github.workspace }}/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: Build
run: |
cargo build --target=x86_64-pc-windows-msvc
cargo build --target=i686-pc-windows-msvc
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: osu-switcher
path: ${{ github.workspace }}/target/**/osu-switcher.exe