CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m35s
70 lines
3.0 KiB
YAML
70 lines
3.0 KiB
YAML
name: Release Binaries & Packages
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Release tag to publish assets to (default: v3.0.0)'
|
|
required: false
|
|
default: 'v3.0.0'
|
|
|
|
jobs:
|
|
release:
|
|
name: Build & Release Standalone Binaries (Linux & Windows Cross-Compilation)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install System and Cross-Compilation Build Dependencies
|
|
run: |
|
|
if command -v apt-get >/dev/null 2>&1; then
|
|
echo "[*] Installing Python shared libraries, headers, Wine, and build dependencies..."
|
|
SUDO=""
|
|
if [ "$(id -u)" -ne 0 ] && command -v sudo >/dev/null 2>&1; then
|
|
SUDO="sudo"
|
|
fi
|
|
$SUDO dpkg --add-architecture i386 || true
|
|
$SUDO apt-get update && $SUDO apt-get install -y --no-install-recommends \
|
|
python3-dev libpython3-dev python3-all-dev "libpython3.*" \
|
|
wine wine64 innoextract curl tar gzip || true
|
|
|
|
# Setup Inno Setup compiler under Wine if not present
|
|
if ! command -v iscc >/dev/null 2>&1 && command -v innoextract >/dev/null 2>&1; then
|
|
echo "[*] Setting up portable Inno Setup 6 compiler for Wine..."
|
|
mkdir -p /tmp/inno_setup
|
|
curl -fsSL https://files.jrsoftware.org/is/6/innosetup-6.2.2.exe -o /tmp/inno_setup/innosetup.exe || true
|
|
if [ -f /tmp/inno_setup/innosetup.exe ]; then
|
|
$SUDO innoextract -d /opt/innosetup /tmp/inno_setup/innosetup.exe || true
|
|
if [ -f /opt/innosetup/app/ISCC.exe ]; then
|
|
$SUDO sh -c 'printf "#!/bin/sh\nWINEDEBUG=-all wine /opt/innosetup/app/ISCC.exe \"\$@\"\n" > /usr/local/bin/iscc'
|
|
$SUDO chmod +x /usr/local/bin/iscc
|
|
echo "[+] Inno Setup compiler iscc configured successfully at /usr/local/bin/iscc"
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
python3 compilation/ensure_pip.py
|
|
python3 -m pip install --upgrade pip --break-system-packages 2>/dev/null || python3 -m pip install --upgrade pip 2>/dev/null || true
|
|
python3 -m pip install pyinstaller distlib cryptography -r compilation/requirements.txt --break-system-packages 2>/dev/null || python3 -m pip install pyinstaller distlib cryptography -r compilation/requirements.txt
|
|
|
|
- name: Compile Standalone Binaries (Linux & Windows)
|
|
run: |
|
|
python3 compilation/package_dist.py --target all
|
|
|
|
- name: Publish Unified Release Assets
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.TAG_TOKEN || github.token }}
|
|
GITEA_SERVER_URL: ${{ github.server_url }}
|
|
GITEA_REPOSITORY: ${{ github.repository }}
|
|
GITEA_REF_NAME: ${{ inputs.tag || github.event.release.tag_name || github.ref_name }}
|
|
run: |
|
|
python3 compilation/upload_release.py --skip-build
|