This repository has been archived by the owner on May 2, 2024. It is now read-only.
Remove previous DMG if it exists #52
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
name: Rust | |
on: | |
push: | |
branches: [ "rewrite" ] | |
pull_request: | |
branches: [ "rewrite" ] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
MODIO_API_KEY: ${{ secrets.MODIO_API_KEY }} | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build for Linux | |
run: cargo build --release --verbose | |
- name: Tar executable | |
run: tar -cvf bonelab_mod_manager.tar -C target/release bonelab_mod_manager | |
- name: Upload Linux build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bonelab_mod_manager-${{ runner.os }} | |
path: bonelab_mod_manager.tar | |
- name: Run tests | |
run: cargo test --release --verbose | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build for Windows | |
run: cargo build --release --verbose | |
- name: Upload Windows build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bonelab_mod_manager-${{ runner.os }} | |
path: target/release/bonelab_mod_manager.exe | |
- name: Run tests | |
run: cargo test --release --verbose |