51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: |
|
|
x86_64-unknown-linux-gnu
|
|
x86_64-pc-windows-gnu
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y \
|
|
pkg-config \
|
|
libasound2-dev \
|
|
gcc-mingw-w64-x86-64
|
|
|
|
- name: Build Linux
|
|
run: cargo build --release --target x86_64-unknown-linux-gnu
|
|
|
|
- name: Build Windows
|
|
env:
|
|
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
|
|
run: cargo build --release --target x86_64-pc-windows-gnu
|
|
|
|
- name: Collect artifacts
|
|
run: |
|
|
mkdir artifacts
|
|
cp target/x86_64-unknown-linux-gnu/release/ncmprs artifacts/ncmprs
|
|
cp target/x86_64-pc-windows-gnu/release/ncmprs.exe artifacts/ncmprs.exe
|
|
|
|
- name: Create Release
|
|
uses: akkuman/gitea-release-action@v1
|
|
with:
|
|
files: |
|
|
artifacts/ncmprs
|
|
artifacts/ncmprs.exe
|