Files
DndGamePlayer/.gitea/workflows/release.yml
T
Ivan Fontosh 7c858ba633 feat(phase1): rebrand to TTRPG Player and drop Git updates feed
Rename product to TTRPG Player (TTRPGPlayer / com.ttrpgplayer.app), use .ttrpg.zip for new saves while keeping .dnd.zip import, accept TTRPG- and DND- license keys on client, and remove sync-update-feed plus CI push to DndGamePlayerUpdates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-17 20:56:14 +08:00

99 lines
3.4 KiB
YAML

# Сборка по тегу v* (Win NSIS + Linux AppImage x64/arm64).
#
# Метки runs-on = labels act_runner (Gitea → Действия → Раннеры).
# Публикация обновлений в Git-репозиторий отключена (фаза 1); выкладка на статический VPS — фаза 2.
#
# Secrets для feed больше не нужны. См. docs/GITEA_AUTO_UPDATE.md
name: Release
on:
push:
tags:
- 'v*'
env:
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Зависимости Win-сборки на Linux (amd64, без multiarch i386)
shell: bash
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
nsis \
wine64
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
W64="$(command -v wine64 2>/dev/null || true)"
if [[ -z "$W64" || ! -x "$W64" ]]; then
for p in /usr/bin/wine64 /usr/lib/wine/wine64; do
if [[ -x "$p" ]]; then W64="$p"; break; fi
done
fi
if [[ -z "${W64:-}" || ! -x "$W64" ]]; then
echo "wine64 binary not found after apt install wine64" >&2
dpkg -L wine64 2>/dev/null | head -80 >&2 || true
exit 1
fi
printf '%s\n' '#!/bin/sh' "exec $W64 \"\$@\"" | sudo tee /usr/local/bin/wine >/dev/null
sudo chmod +x /usr/local/bin/wine
wine --version
- name: Версия из тега
shell: bash
run: |
TAG="${GITHUB_REF_NAME:-${GITEA_REF_NAME:-}}"
VERSION="${TAG#v}"
npm version "$VERSION" --allow-same-version --no-git-tag-version
- run: npm ci
- run: npm run build
- name: Зависимости Linux AppImage и кросс-сборка arm64 на amd64
shell: bash
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
qemu-user-static \
binfmt-support \
desktop-file-utils \
squashfs-tools
- name: electron-builder (linux AppImage x64, arm64)
run: npx electron-builder --linux AppImage --x64 --arm64 --publish never
- name: sharp (@img/sharp-win32-x64) для Windows-артефакта при сборке на Linux
shell: bash
run: |
set -euo pipefail
tmp="$(mktemp -d)"
npm pack @img/sharp-win32-x64@0.34.5 --pack-destination "$tmp"
mkdir -p node_modules/@img/sharp-win32-x64
tar -xzf "$tmp/img-sharp-win32-x64-0.34.5.tgz" -C "$tmp"
cp -a "$tmp/package/." node_modules/@img/sharp-win32-x64/
test -f node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64.node
rm -rf "$tmp"
- name: electron-builder (win)
run: npx electron-builder --win --publish never
- name: Артефакты сборки
shell: bash
run: |
set -euo pipefail
echo "=== release/ ==="
ls -la release/ || true
echo "Готово. Выкладка на update-сервер — вручную или в фазе 2 (VPS + nginx)."