From f370821cfe55ca1ded3caa89aeaff7edce905458 Mon Sep 17 00:00:00 2001 From: Stanislav Pastushenko Date: Tue, 9 Dec 2025 21:00:06 +0100 Subject: [PATCH] guitea build --- .gitea/workflows/build.yml | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..a20007b --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,55 @@ +name: Build + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + name: Build - ${{ matrix.platform }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - platform: linux + os: ubuntu-latest + target: x86_64-unknown-linux-gnu + artifact_name: rlogg-linux-x86_64 + binary_extension: "" + - platform: macos + os: macos-latest + target: x86_64-apple-darwin + artifact_name: rlogg-macos-x86_64 + binary_extension: "" + - platform: windows + os: windows-latest + target: x86_64-pc-windows-msvc + artifact_name: rlogg-windows-x86_64 + binary_extension: ".exe" + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + target: ${{ matrix.target }} + + - name: Build release binary + run: cargo build --release --target ${{ matrix.target }} + + - name: Prepare artifact + shell: bash + run: | + mkdir -p dist + cp target/${{ matrix.target }}/release/rlogg${{ matrix.binary_extension }} dist/${{ matrix.artifact_name }}${{ matrix.binary_extension }} + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact_name }} + path: dist/${{ matrix.artifact_name }}${{ matrix.binary_extension }} + retention-days: 14