Files
2026-09-07 18:41:49 +05:00

101 lines
2.4 KiB
YAML

name: Build Reporter
on:
push:
branches: [ master ]
tags: [ 'reporter-v*.*.*' ]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
validate:
uses: ./.github/workflows/validate-release.yml
with:
component: reporter
linux-amd64:
needs: validate
name: Linux amd64 (.deb)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Build Debian package
run: cargo deb -p reporter -- --bin cheburchecker
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: linux-amd64-deb
path: target/debian/*.deb
compression-level: 0
linux-arm64:
needs: validate
name: Linux arm64 (.deb via cross)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Build binary
uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: "aarch64-unknown-linux-gnu"
args: "--release --package reporter --bin cheburchecker"
strip: true
- name: Create Debian archive
run: cargo deb --target aarch64-unknown-linux-gnu --no-strip --no-build -p reporter -- --bin cheburchecker
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: linux-arm64-deb
path: target/aarch64-unknown-linux-gnu/debian/*.deb
windows:
needs: validate
name: Windows amd64
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build release binary
run: cargo build --release --package reporter --bin cheburchecker
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: windows-amd64-exe
path: target/release/*.exe
release:
needs: [linux-amd64, linux-arm64, windows]
if: github.event_name == 'push' && github.ref_type == 'tag'
permissions:
contents: write
actions: read
uses: ./.github/workflows/release.yml
with:
component: reporter
artifact-pattern: '*'