Prepare GitHub alpha launch (README, CI, tests, release workflow)
This commit is contained in:
34
.github/workflows/ci.yml
vendored
Executable file
34
.github/workflows/ci.yml
vendored
Executable file
@@ -0,0 +1,34 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
name: Rust Checks
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Cache cargo artifacts
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Format check
|
||||
run: cargo fmt --check
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
- name: Unit tests
|
||||
run: cargo test
|
||||
|
||||
- name: Cargo check
|
||||
run: cargo check
|
||||
38
.github/workflows/release.yml
vendored
Executable file
38
.github/workflows/release.yml
vendored
Executable file
@@ -0,0 +1,38 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: Build Linux Binary
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Cache cargo artifacts
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Build release binary
|
||||
run: cargo build --release
|
||||
|
||||
- name: Prepare release asset
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/release/deskify dist/deskify-linux-x86_64
|
||||
|
||||
- name: Upload GitHub Release asset
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/deskify-linux-x86_64
|
||||
generate_release_notes: true
|
||||
Reference in New Issue
Block a user