Some checks failed
Build Windows Desktop Client / Build Windows Client (push) Has been cancelled
Add workflow to build Windows desktop client using cargo-xwin on Linux runners. Install Node.js 22, Rust with x86_64-pc-windows-msvc target, and required system dependencies including NSIS for installer creation. Build bundled Windows tunnel helper and desktop client installer, then upload both NSIS installer artifacts and raw executables.
86 lines
2.2 KiB
YAML
86 lines
2.2 KiB
YAML
name: Build Windows Desktop Client
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
paths:
|
|
- ".gitea/workflows/windows-desktop-client.yml"
|
|
- "desktop-client/**"
|
|
|
|
jobs:
|
|
build-windows-client:
|
|
name: Build Windows Client
|
|
runs-on:
|
|
- self-hosted
|
|
- linux
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: desktop-client
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: x86_64-pc-windows-msvc
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
build-essential \
|
|
curl \
|
|
wget \
|
|
file \
|
|
nsis \
|
|
pkg-config \
|
|
libssl-dev \
|
|
libayatana-appindicator3-dev \
|
|
librsvg2-dev \
|
|
patchelf
|
|
|
|
- name: Install cargo-xwin
|
|
run: |
|
|
if ! cargo xwin --version >/dev/null 2>&1; then
|
|
cargo install --locked cargo-xwin
|
|
fi
|
|
|
|
- name: Install desktop client dependencies
|
|
run: npm install
|
|
|
|
- name: Build bundled Windows tunnel helper
|
|
run: npm run helper:windows-x64
|
|
|
|
- name: Build Windows installer
|
|
run: npm run tauri:build:windows-x64:linux
|
|
|
|
- name: Upload Windows installer
|
|
uses: christopherhx/gitea-upload-artifact@v4
|
|
with:
|
|
name: NexaVPN-windows-installer
|
|
path: |
|
|
desktop-client/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe
|
|
desktop-client/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.msi
|
|
if-no-files-found: error
|
|
|
|
- name: Upload raw Windows build outputs
|
|
uses: christopherhx/gitea-upload-artifact@v4
|
|
with:
|
|
name: NexaVPN-windows-raw-build
|
|
path: |
|
|
desktop-client/src-tauri/target/x86_64-pc-windows-msvc/release/nexavpn-desktop.exe
|
|
desktop-client/src-tauri/bundled/windows-x64/nexavpn-tunnel-helper.exe
|
|
if-no-files-found: error
|