Some checks failed
CI / Rust Format (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Test Server (push) Has been cancelled
CI / Frontend Check (push) Has been cancelled
CI / Tauri Client Check (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Build Tauri (Linux) (push) Has been cancelled
- Fix 14 Clippy warnings across server and bot-sdk - Add 67 unit tests (32 bot-sdk, 34 server, 1 doctest) - Add Prometheus metrics endpoint (/api/metrics) - Add structured JSON logging (EIFELDC_LOG_FORMAT=json) - Add release workflow (Docker push + GitHub Release + Tauri builds) - Add rate limiting middleware (EIFELDC_RATE_LIMIT) - Add CORS restriction (EIFELDC_CORS_ORIGINS) - Add session token expiry (EIFELDC_SESSION_TTL) - Add input validation (username/password/homeserver length limits) - Add upload size limit (EIFELDC_MAX_UPLOAD_MB) - Upgrade Tauri client from v1 to v2 - Add session store with SQLite persistence - Add proper error types and cleanup across all crates - Format all code with cargo fmt - Update CI pipeline with fmt, clippy, test, frontend, and Tauri checks - Add README with full API reference and setup guide
235 lines
6.2 KiB
YAML
235 lines
6.2 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: 1
|
|
|
|
jobs:
|
|
build-server:
|
|
name: Build Server Binary
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache Cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: ${{ runner.os }}-cargo-release-
|
|
|
|
- name: Build release binary
|
|
run: cargo build --release -p eifeldc-server
|
|
|
|
- name: Upload server binary
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: eifeldc-server-linux-amd64
|
|
path: target/release/eifeldc-server
|
|
|
|
build-frontend:
|
|
name: Build Frontend
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: client/src-ui/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: cd client/src-ui && npm ci
|
|
|
|
- name: Build
|
|
run: cd client/src-ui && npm run build
|
|
|
|
- name: Upload frontend dist
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: eifeldc-frontend
|
|
path: client/src-ui/dist
|
|
|
|
docker-push:
|
|
name: Docker Push
|
|
runs-on: ubuntu-latest
|
|
needs: []
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
ghcr.io/${{ github.repository }}/server
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=sha
|
|
|
|
- name: Login to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
build-tauri-linux:
|
|
name: Build Tauri (Linux)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libssl-dev
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: client/src-ui/package-lock.json
|
|
|
|
- name: Install frontend deps
|
|
run: cd client/src-ui && npm ci
|
|
|
|
- name: Build Tauri (Linux)
|
|
uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
projectPath: client
|
|
tagName: ${{ github.ref_name }}
|
|
releaseName: "EifelDC ${{ github.ref_name }}"
|
|
releaseBody: "See [CHANGELOG.md](CHANGELOG.md) for details."
|
|
releaseDraft: true
|
|
|
|
build-tauri-macos:
|
|
name: Build Tauri (macOS)
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: client/src-ui/package-lock.json
|
|
|
|
- name: Install frontend deps
|
|
run: cd client/src-ui && npm ci
|
|
|
|
- name: Build Tauri (macOS)
|
|
uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
projectPath: client
|
|
tagName: ${{ github.ref_name }}
|
|
releaseName: "EifelDC ${{ github.ref_name }}"
|
|
releaseBody: "See [CHANGELOG.md](CHANGELOG.md) for details."
|
|
releaseDraft: true
|
|
|
|
build-tauri-windows:
|
|
name: Build Tauri (Windows)
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: client/src-ui/package-lock.json
|
|
|
|
- name: Install frontend deps
|
|
run: cd client/src-ui && npm ci
|
|
|
|
- name: Build Tauri (Windows)
|
|
uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
projectPath: client
|
|
tagName: ${{ github.ref_name }}
|
|
releaseName: "EifelDC ${{ github.ref_name }}"
|
|
releaseBody: "See [CHANGELOG.md](CHANGELOG.md) for details."
|
|
releaseDraft: true
|
|
|
|
create-release:
|
|
name: Create GitHub Release
|
|
runs-on: ubuntu-latest
|
|
needs: [build-server, build-frontend, docker-push]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download server binary
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: eifeldc-server-linux-amd64
|
|
path: release-assets
|
|
|
|
- name: Download frontend dist
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: eifeldc-frontend
|
|
path: release-assets/frontend
|
|
|
|
- name: Create release archive
|
|
run: |
|
|
cd release-assets
|
|
tar czf eifeldc-server-linux-amd64.tar.gz eifeldc-server
|
|
cd frontend
|
|
tar czf ../eifeldc-frontend.tar.gz .
|
|
cd ..
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
draft: true
|
|
generate_release_notes: true
|
|
files: |
|
|
release-assets/eifeldc-server-linux-amd64.tar.gz
|
|
release-assets/eifeldc-frontend.tar.gz |