Files
UNITRONIX abe0d52fe4 chore: refresh EOL runtimes and patch non-agent dependencies
Move Docker/CI/installers to Node 24 and Go 1.26 images, bump Alpine server runtime, apply safe npm/Go patch updates, migrate SNMP to pysnmp, and document deferred majors.
2026-08-01 09:19:42 +02:00

187 lines
5.6 KiB
YAML

# =============================================================================
# BetterDesk Desktop Client — Build & Release (Multi-Platform)
# =============================================================================
# Builds Tauri desktop client for Windows, Linux, and macOS.
# Desktop client is still in development — NOT triggered by git tags (v*).
# Use workflow_dispatch only when explicitly testing a desktop release build.
#
# Artifacts:
# - Windows: NSIS installer (.exe)
# - Linux: Debian package (.deb) + AppImage
# - macOS: DMG bundle (.dmg)
# =============================================================================
name: Build & Release Desktop Client
on:
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., v3.0.0)'
required: false
default: ''
type: string
permissions:
contents: read
env:
CLIENT_DIR: rdclient-desktop
jobs:
# ---------------------------------------------------------------------------
# Windows x64
# ---------------------------------------------------------------------------
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
cache: true
- name: Install Protobuf Compiler
run: choco install protoc -y
- name: Install frontend dependencies
working-directory: ${{ env.CLIENT_DIR }}
run: npm install --no-audit --no-fund
- name: Build Tauri app
working-directory: ${{ env.CLIENT_DIR }}
run: npm run build
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: betterdesk-windows-x64
path: |
${{ env.CLIENT_DIR }}/src-tauri/target/release/bundle/nsis/*.exe
if-no-files-found: error
# ---------------------------------------------------------------------------
# Linux x64
# ---------------------------------------------------------------------------
build-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libayatana-appindicator3-dev \
protobuf-compiler
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
cache: true
- name: Install frontend dependencies
working-directory: ${{ env.CLIENT_DIR }}
run: npm install --no-audit --no-fund
- name: Build Tauri app
working-directory: ${{ env.CLIENT_DIR }}
run: npm run build
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: betterdesk-linux-x64
path: |
${{ env.CLIENT_DIR }}/src-tauri/target/release/bundle/deb/*.deb
${{ env.CLIENT_DIR }}/src-tauri/target/release/bundle/appimage/*.AppImage
if-no-files-found: error
# ---------------------------------------------------------------------------
# macOS (Universal: ARM64 + x64)
# ---------------------------------------------------------------------------
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
targets: aarch64-apple-darwin,x86_64-apple-darwin
cache: true
- name: Install Protobuf Compiler
run: brew install protobuf
- name: Install frontend dependencies
working-directory: ${{ env.CLIENT_DIR }}
run: npm install --no-audit --no-fund
- name: Build Tauri app
working-directory: ${{ env.CLIENT_DIR }}
run: npm run build
- name: Upload macOS artifacts
uses: actions/upload-artifact@v4
with:
name: betterdesk-macos
path: |
${{ env.CLIENT_DIR }}/src-tauri/target/release/bundle/dmg/*.dmg
if-no-files-found: error
# ---------------------------------------------------------------------------
# Release — Combine all artifacts into a GitHub Release
# ---------------------------------------------------------------------------
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build-windows, build-linux, build-macos]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Generate checksums
run: |
find . -type f \( -name "*.exe" -o -name "*.deb" -o -name "*.AppImage" -o -name "*.dmg" \) | while read f; do
sha256sum "$f" >> CHECKSUMS.sha256
done
cat CHECKSUMS.sha256
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
betterdesk-windows-x64/*.exe
betterdesk-linux-x64/*.deb
betterdesk-linux-x64/*.AppImage
betterdesk-macos/*.dmg
CHECKSUMS.sha256