From cc687eb159b4f227fef77ebcc83f7c744c667b7b Mon Sep 17 00:00:00 2001 From: nicknase27 Date: Sun, 26 Jul 2026 11:09:16 +0200 Subject: [PATCH] Gitea workflow? --- .gitea/workflows/build.yml | 50 ++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index b499fd3..7bbb4ab 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -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