Initial commit: FunConnect project with server, relay, client and admin panel
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
116
.github/workflows/build.yml
vendored
Normal file
116
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
name: Build & Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build-server:
|
||||
name: Build Server
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Cache cargo
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Build Server
|
||||
run: cargo build --release -p funmc-server
|
||||
|
||||
- name: Build Relay Server
|
||||
run: cargo build --release -p funmc-relay-server
|
||||
|
||||
- name: Upload Server Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: server-linux
|
||||
path: |
|
||||
target/release/server
|
||||
target/release/relay-server
|
||||
|
||||
build-client:
|
||||
name: Build Client (${{ matrix.platform }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: ubuntu-22.04
|
||||
target: linux
|
||||
- platform: windows-latest
|
||||
target: windows
|
||||
- platform: macos-latest
|
||||
target: macos
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install Linux Dependencies
|
||||
if: matrix.target == 'linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
- name: Cache cargo
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Install Frontend Dependencies
|
||||
working-directory: client/ui
|
||||
run: npm ci
|
||||
|
||||
- name: Build Tauri App
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
projectPath: client
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: client-${{ matrix.target }}
|
||||
path: |
|
||||
client/target/release/bundle/**/*.exe
|
||||
client/target/release/bundle/**/*.msi
|
||||
client/target/release/bundle/**/*.dmg
|
||||
client/target/release/bundle/**/*.AppImage
|
||||
client/target/release/bundle/**/*.deb
|
||||
|
||||
release:
|
||||
name: Create Release
|
||||
needs: [build-server, build-client]
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Download All Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
server-linux/*
|
||||
client-windows/**/*
|
||||
client-macos/**/*
|
||||
client-linux/**/*
|
||||
draft: true
|
||||
generate_release_notes: true
|
||||
Reference in New Issue
Block a user