Files
gscord-desktop/.gitea/workflows/desktop.yml
T
gandc fc391963a4
Build Fluxer Desktop / Windows x64 (push) Failing after 1m34s
Build Fluxer Desktop / Linux x64 (push) Failing after 2m50s
initial
2026-09-16 19:59:02 +03:00

374 lines
8.8 KiB
YAML

name: Build Fluxer Desktop
on:
workflow_dispatch:
push:
branches:
- main
env:
NODE_VERSION: "24"
PNPM_VERSION: "10.29.3"
BUILD_CHANNEL: "stable"
NODE_ENV: "production"
FLUXER_DESKTOP_PRODUCTION: "true"
VERSION: "1.0.${{ gitea.run_number }}"
PUBLIC_BUILD_VERSION: "1.0.${{ gitea.run_number }}"
PUBLIC_RELEASE_CHANNEL: "stable"
jobs:
windows-x64:
name: Windows x64
runs-on: rustdesk-windows
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Setup pnpm
shell: powershell
run: |
$ErrorActionPreference = "Stop"
corepack enable
corepack prepare pnpm@10.29.3 --activate
node --version
pnpm --version
- name: Setup Rust
shell: powershell
run: |
$ErrorActionPreference = "Stop"
rustup update stable
rustup default stable
rustup target add x86_64-pc-windows-msvc
rustc --version
cargo --version
- name: Show build tools
shell: powershell
run: |
$ErrorActionPreference = "Stop"
Write-Host "Node:"
node --version
Write-Host "pnpm:"
pnpm --version
Write-Host "Rust:"
rustc --version
Write-Host "Cargo:"
cargo --version
Write-Host "CMake:"
cmake --version
Write-Host "Ninja:"
ninja --version
Write-Host "Clang:"
clang --version
Write-Host "NASM:"
nasm --version
- name: Configure self-hosted server
shell: powershell
run: |
$ErrorActionPreference = "Stop"
$Path = "fluxer_desktop/src/common/Constants.ts"
$Content = Get-Content $Path -Raw
$Content = $Content.Replace(
"export const STABLE_APP_URL = 'https://web.fluxer.app';",
"export const STABLE_APP_URL = 'https://ds.gandc.ru';"
)
$Content = $Content.Replace(
"export const CANARY_APP_URL = 'https://web.canary.fluxer.app';",
"export const CANARY_APP_URL = 'https://ds.gandc.ru';"
)
Set-Content `
-Path $Path `
-Value $Content `
-NoNewline `
-Encoding utf8
Get-Content $Path
if ((Get-Content $Path -Raw) -match "web\.fluxer\.app") {
throw "STABLE_APP_URL was not replaced"
}
if ((Get-Content $Path -Raw) -match "web\.canary\.fluxer\.app") {
throw "CANARY_APP_URL was not replaced"
}
- name: Install dependencies
shell: powershell
run: |
$ErrorActionPreference = "Stop"
pnpm install --frozen-lockfile
- name: Build Fluxer Desktop
shell: powershell
env:
ELECTRON_ARCH: x64
run: |
$ErrorActionPreference = "Stop"
pnpm --filter fluxer_desktop build
- name: Package Windows portable
shell: powershell
env:
ELECTRON_ARCH: x64
CSC_IDENTITY_AUTO_DISCOVERY: "false"
run: |
$ErrorActionPreference = "Stop"
Set-Location fluxer_desktop
pnpm exec electron-builder `
--config electron-builder.config.cjs `
--win portable `
--x64 `
--publish never
- name: Show Windows artifacts
shell: powershell
run: |
$ErrorActionPreference = "Stop"
Get-ChildItem `
-Path "fluxer_desktop/dist-electron" `
-Recurse |
Select-Object FullName, Length
- name: Upload Windows artifact
uses: actions/upload-artifact@v4.6.2
with:
name: fluxer-windows-x64
path: |
fluxer_desktop/dist-electron/*.exe
if-no-files-found: error
linux-x64:
name: Linux x64
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Linux build dependencies
shell: bash
run: |
set -euxo pipefail
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
ca-certificates \
clang \
cmake \
curl \
desktop-file-utils \
dpkg-dev \
fakeroot \
ffmpeg \
git \
libasound2 \
libaom-dev \
libavcodec-dev \
libavfilter-dev \
libavformat-dev \
libavutil-dev \
libdbus-1-dev \
libdav1d-dev \
libde265-dev \
libfido2-dev \
libgbm1 \
libgtk-3-0 \
liblcms2-dev \
libnotify4 \
libnss3 \
libpipewire-0.3-dev \
libpulse-dev \
libsecret-1-0 \
libssl-dev \
libswresample-dev \
libswscale-dev \
libudev-dev \
libvips-dev \
libwayland-dev \
libwebp-dev \
libx11-xcb1 \
libxcb-dri3-0 \
libxcomposite1 \
libxdamage1 \
libxkbcommon-dev \
libxkbcommon0 \
libxrandr2 \
libxshmfence1 \
libxss1 \
libxtst6 \
llvm \
meson \
nasm \
ninja-build \
pkg-config \
python3 \
python3-pip \
rpm \
unzip \
xdg-utils \
xz-utils \
yasm \
zlib1g-dev \
zstd
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Setup pnpm
shell: bash
run: |
set -euxo pipefail
corepack enable
corepack prepare pnpm@10.29.3 --activate
node --version
pnpm --version
- name: Setup Rust
shell: bash
run: |
set -euxo pipefail
curl \
--proto '=https' \
--tlsv1.2 \
-sSf \
https://sh.rustup.rs |
sh -s -- -y --profile minimal
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
"$HOME/.cargo/bin/rustup" update stable
"$HOME/.cargo/bin/rustup" default stable
"$HOME/.cargo/bin/rustc" --version
"$HOME/.cargo/bin/cargo" --version
- name: Configure self-hosted server
shell: bash
run: |
set -euxo pipefail
python3 <<'PY'
from pathlib import Path
path = Path("fluxer_desktop/src/common/Constants.ts")
data = path.read_text(encoding="utf-8")
data = data.replace(
"export const STABLE_APP_URL = 'https://web.fluxer.app';",
"export const STABLE_APP_URL = 'https://ds.gandc.ru';",
)
data = data.replace(
"export const CANARY_APP_URL = 'https://web.canary.fluxer.app';",
"export const CANARY_APP_URL = 'https://ds.gandc.ru';",
)
path.write_text(data, encoding="utf-8")
if "https://web.fluxer.app" in data:
raise SystemExit("STABLE_APP_URL was not replaced")
if "https://web.canary.fluxer.app" in data:
raise SystemExit("CANARY_APP_URL was not replaced")
print(data)
PY
- name: Install dependencies
shell: bash
run: |
set -euxo pipefail
pnpm install --frozen-lockfile
- name: Build Fluxer Desktop
shell: bash
env:
ELECTRON_ARCH: x64
run: |
set -euxo pipefail
pnpm --filter fluxer_desktop build
- name: Package Linux
shell: bash
env:
ELECTRON_ARCH: x64
CSC_IDENTITY_AUTO_DISCOVERY: "false"
run: |
set -euxo pipefail
cd fluxer_desktop
pnpm exec electron-builder \
--config electron-builder.config.cjs \
--linux AppImage deb \
--x64 \
--publish never
- name: Show Linux artifacts
shell: bash
run: |
set -euxo pipefail
find fluxer_desktop/dist-electron \
-maxdepth 2 \
-type f \
-printf '%p %s bytes\n' |
sort
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4.6.2
with:
name: fluxer-linux-x64
path: |
fluxer_desktop/dist-electron/*.AppImage
fluxer_desktop/dist-electron/*.deb
if-no-files-found: error