Gitea workflow?

This commit is contained in:
2026-07-26 11:09:16 +02:00
parent afe2e6d375
commit cc687eb159
+23 -27
View File
@@ -1,45 +1,41 @@
name: Build and Release
name: Build
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: ncmprs
- os: windows-latest
target: x86_64-pc-windows-msvc
binary: ncmprs.exe
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
targets: |
x86_64-unknown-linux-gnu
x86_64-pc-windows-gnu
- name: Install Linux dependencies
if: runner.os == 'Linux'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev pkg-config
apt-get update
apt-get install -y \
pkg-config \
libasound2-dev \
gcc-mingw-w64-x86-64
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Build Linux
run: cargo build --release --target x86_64-unknown-linux-gnu
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: target/${{ matrix.target }}/release/${{ matrix.binary }}
- 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-linux
cp target/x86_64-pc-windows-gnu/release/ncmprs.exe artifacts/ncmprs.exe