Gitea workflow?
This commit is contained in:
+23
-27
@@ -1,45 +1,41 @@
|
|||||||
name: Build and Release
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "v*"
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
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 }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
targets: |
|
||||||
|
x86_64-unknown-linux-gnu
|
||||||
|
x86_64-pc-windows-gnu
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
- name: Install dependencies
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
apt-get update
|
||||||
sudo apt-get install -y libasound2-dev pkg-config
|
apt-get install -y \
|
||||||
|
pkg-config \
|
||||||
|
libasound2-dev \
|
||||||
|
gcc-mingw-w64-x86-64
|
||||||
|
|
||||||
- name: Build
|
- name: Build Linux
|
||||||
run: cargo build --release --target ${{ matrix.target }}
|
run: cargo build --release --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
- name: Upload to Release
|
- name: Build Windows
|
||||||
uses: softprops/action-gh-release@v2
|
env:
|
||||||
with:
|
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
|
||||||
files: target/${{ matrix.target }}/release/${{ matrix.binary }}
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user