Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Rust Build

Rust Build #5

Workflow file for this run

name: Rust Build
on:
workflow_dispatch:
inputs:
debug:
description: Make debug build
required: false
type: boolean
env:
CARGO_TERM_COLOR: always
MODIO_API_KEY: ${{ secrets.MODIO_API_KEY }}
jobs:
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 release
if: ${{ !steps.debug }}
run: cargo build --release --verbose
- name: Upload release artifact
if: ${{ !steps.debug }}
uses: actions/upload-artifact@v3
with:
name: bonelab_mod_manager-${{ runner.os }}-release
path: target/release/bonelab_mod_manager.exe
- name: Build debug
if: ${{ steps.debug }}
run: cargo build --verbose
- name: Upload debug artifact
if: ${{ steps.debug }}
uses: actions/upload-artifact@v3
with:
name: bonelab_mod_manager-${{ runner.os }}-debug
path: target/debug/bonelab_mod_manager.exe
build-macos:
if: ${{ !steps.debug }}

Check failure on line 48 in .github/workflows/rust-build.yml

View workflow run for this annotation

GitHub Actions / Rust Build

Invalid workflow file

The workflow is not valid. .github/workflows/rust-build.yml (Line: 48, Col: 9): Unrecognized named-value: 'steps'. Located at position 2 within expression: !steps.debug .github/workflows/rust-build.yml (Line: 88, Col: 9): Unrecognized named-value: 'steps'. Located at position 2 within expression: !steps.debug
runs-on: macos-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 x86_64
run: cargo build --release --target x86_64-apple-darwin --verbose
- name: Add aarch64 target
run: rustup target add aarch64-apple-darwin
- name: Build aarch64
run: cargo build --release --target aarch64-apple-darwin --verbose
- name: Create universal executable
run: |
lipo \
target/x86_64-apple-darwin/release/bonelab_mod_manager \
target/aarch64-apple-darwin/release/bonelab_mod_manager \
-create \
-output "Bonelab Mod Manager Installer/Bonelab Mod Manager.app/Contents/Resources/bonelab_mod_manager"
- name: Make Applications alias
run: ln -s /Applications "Bonelab Mod Manager Installer"
- name: Create DMG
run: |
hdiutil \
create \
-srcfolder "Bonelab Mod Manager Installer" \
bonelab_mod_manager.dmg
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bonelab_mod_manager-${{ runner.os }}
path: bonelab_mod_manager.dmg
build-linux:
if: ${{ !steps.debug }}
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
run: cargo build --release --verbose
- name: Create TAR
run: tar -czvf bonelab_mod_manager.tar.gz -C target/release bonelab_mod_manager
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bonelab_mod_manager-${{ runner.os }}
path: bonelab_mod_manager.tar.gz