ci: add automatic builds
Some checks failed
Build and Upload filesorters Binaries / Build for Linux (push) Has been cancelled
Build and Upload filesorters Binaries / Build for Windows (push) Failing after -4m2s

This commit is contained in:
Vladimir Rubin 2024-12-30 17:40:41 +02:00
parent 140a7cc71f
commit fe1ecb0817
Signed by: vavakado
GPG key ID: CAB744727F36B524

View file

@ -0,0 +1,49 @@
name: Build and Upload filesorters Binaries
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-linux:
name: Build for Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Build for Linux
run: cargo build --release
- name: Upload Linux artifact
uses: forgejo/upload-artifact@v4
with:
name: linux-binary
path: target/release/filesorters
build-windows:
name: Build for Windows
runs-on: ubuntu-latest-root
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Install cross
run: cargo install cross
- name: Build for Windows
run: cross build --release --target x86_64-pc-windows-gnu
- name: Upload Windows artifact
uses: forgejo/upload-artifact@v4
with:
name: windows-binary
path: target/x86_64-pc-windows-gnu/release/filesorters.exe