ci: add automatic builds
This commit is contained in:
parent
140a7cc71f
commit
fe1ecb0817
1 changed files with 49 additions and 0 deletions
49
.forgejo/workflows/build.yml
Normal file
49
.forgejo/workflows/build.yml
Normal 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
|
Loading…
Reference in a new issue