Action: Rust
Use the first action to build Rust CLI tool and upload it to CI artifacts, then use the second action to download the artifacts, sign them, and create a release
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- image: blacksmith-4vcpu-ubuntu-2404
target: x64
- image: blacksmith-4vcpu-ubuntu-2404-arm
target: arm64
- image: blacksmith-6vcpu-macos-latest
target: arm64
- image: blacksmith-4vcpu-windows-2025
target: x64
# if needed: blacksmith currently doesn't have windows runners
# - image: windows-11-arm
# target: arm64
runs-on: ${{ matrix.image }}
steps:
- uses: Pistonight/mono-dev/actions/setup@main
with:
rust: stable
rust-native: ${{ matrix.target }}
# if needed
# rust-src: true
- uses: Pistonight/mono-dev/actions/rust-xplat@main
with:
arch: ${{ matrix.target }}
binary: botwrdb
# optional: install tauri build dependencies, default false
tauri: true
# optional: additional build arguments
# default build args included:
# --bin <binary>
# --release
# --target <triple> (for apple only)
build-args: "--feature too"
# optional: target directory for the build (default is `target`)
target-dir: my-target-dir
# optional: Task to run before building
pre-task: exec -- pre-build
# optional: Task to run after building (not ran if build fails)
post-task: exec -- post-build
# optional: Task to run instead of cargo build. cargo build args are passed in as .CLI_ARGS
build-task: exec -- build
name: Release
on:
push:
tags:
- v*.*.*
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- if: startsWith(github.ref, 'refs/tags/v')
uses: Pistonight/mono-dev/actions/release@main
with:
artifacts-workflow: build.yml
artifacts-path: release
pack: botwrdb-*
minisign-key: ${{ secrets.MINISIGN_KEY }}