mirror of
https://github.com/LowderPlay/cheburcheck.git
synced 2026-09-22 22:37:59 +03:00
98 lines
2.4 KiB
YAML
98 lines
2.4 KiB
YAML
name: Build Rust Application
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
linux-amd64:
|
|
name: Linux amd64 (.deb)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install cargo-deb
|
|
run: cargo install cargo-deb
|
|
|
|
- name: Build Debian package
|
|
run: cargo deb -- --bin cheburchecker
|
|
|
|
- name: Find deb file
|
|
id: find_deb_amd64
|
|
run: |
|
|
FILE=$(ls target/debian/*.deb | head -n 1)
|
|
echo "file=$FILE" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-amd64-deb
|
|
path: ${{ steps.find_deb_amd64.outputs.file }}
|
|
compression-level: 0
|
|
|
|
linux-arm64:
|
|
name: Linux arm64 (.deb via cross)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- 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 --bin cheburchecker"
|
|
|
|
- name: Create Debian archive
|
|
run: cargo deb --target aarch64-unknown-linux-gnu --no-build --bin cheburchecker
|
|
|
|
- name: Find deb file
|
|
id: find_deb_arm64
|
|
run: |
|
|
FILE=$(ls target/aarch64-unknown-linux-gnu/debian/*.deb | head -n 1)
|
|
echo "file=$FILE" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-arm64-deb
|
|
path: ${{ steps.find_deb_arm64.outputs.file }}
|
|
|
|
windows:
|
|
name: Windows amd64
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Build release binary
|
|
run: cargo build --release --bin cheburchecker
|
|
|
|
- name: Find exe
|
|
id: find_exe
|
|
run: |
|
|
FILE=$(ls target/release/*.exe | head -n 1)
|
|
echo "file=$FILE" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-amd64-exe
|
|
path: ${{ steps.find_exe.outputs.file }}
|