XPlor/.gitea/workflows/release.yml
njohnson 4c0251934f
All checks were successful
Release / build-linux (push) Successful in 1m0s
Release / build-macos (push) Successful in 2m31s
Release / build-windows (push) Successful in 4m56s
Release / deploy (push) Successful in 44s
Move deploy job to Linux runner, use /repository path
- Change deploy job from Windows to Ubuntu runner
- Convert all CMD scripts to bash
- Change repository path from P:\repository to /repository
- Add Windows repository upload step
- Merge all three platform repositories in deploy job

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 21:10:04 -05:00

749 lines
25 KiB
YAML

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # stable: v1.0.0
- 'v[0-9]+.[0-9]+.[0-9]+-alpha*' # alpha: v1.0.0-alpha1
- 'v[0-9]+.[0-9]+.[0-9]+-test*' # tester: v1.0.0-test1
jobs:
# ===========================================================================
# Windows Build
# ===========================================================================
build-windows:
runs-on: windows
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Extract version info
shell: cmd
run: |
setlocal enabledelayedexpansion
set "TAG=%GITHUB_REF_NAME%"
set "VERSION=!TAG:~1!"
set "CHANNEL=stable"
echo !TAG! | findstr /C:"-alpha" >nul && set "CHANNEL=alpha"
echo !TAG! | findstr /C:"-test" >nul && set "CHANNEL=tester"
REM Extract clean version (remove -alpha* or -test* suffix)
set "CLEAN_VERSION=!VERSION!"
for /f "tokens=1 delims=-" %%a in ("!VERSION!") do set "CLEAN_VERSION=%%a"
echo VERSION=!VERSION!>> %GITHUB_ENV%
echo CLEAN_VERSION=!CLEAN_VERSION!>> %GITHUB_ENV%
echo CHANNEL=!CHANNEL!>> %GITHUB_ENV%
echo Building version: !VERSION! for channel: !CHANNEL!
- name: Build Release
shell: cmd
run: |
set PATH=C:\Qt\6.10.1\msvc2022_64\bin;C:\Qt\Tools\QtCreator\bin\jom;%PATH%
if not exist build mkdir build
cd build
echo === Running qmake ===
qmake.exe ..\XPlor.pro -spec win32-msvc "CONFIG+=release"
if errorlevel 1 exit /b 1
echo === Building with jom ===
jom.exe -j %NUMBER_OF_PROCESSORS%
if errorlevel 1 exit /b 1
- name: Deploy Qt Libraries
shell: cmd
run: |
set PATH=C:\Qt\6.10.1\msvc2022_64\bin;%PATH%
echo === windeployqt for app ===
cd build\app\release
windeployqt6.exe --release --no-translations app.exe
if errorlevel 1 exit /b 1
cd ..\..\..
echo === windeployqt for cli ===
cd build\tools\cli\release
windeployqt6.exe --release --no-translations cli.exe
- name: Package for Installer
shell: cmd
run: |
set GUI_DATA=installer\packages\com.xplor.gui\data
set CLI_DATA=installer\packages\com.xplor.cli\data
REM Clean and create directories
if exist "%GUI_DATA%" rmdir /s /q "%GUI_DATA%"
if exist "%CLI_DATA%" rmdir /s /q "%CLI_DATA%"
mkdir "%GUI_DATA%"
mkdir "%CLI_DATA%\cli"
REM Copy GUI files
xcopy /s /e /y /q "build\app\release\*" "%GUI_DATA%\" >nul
if exist "%GUI_DATA%\definitions" rmdir /s /q "%GUI_DATA%\definitions"
if exist "%GUI_DATA%\scripts" rmdir /s /q "%GUI_DATA%\scripts"
if exist "%GUI_DATA%\app.exe" ren "%GUI_DATA%\app.exe" "XPlor.exe"
REM Copy CLI files
xcopy /s /e /y /q "build\tools\cli\release\*" "%CLI_DATA%\cli\" >nul
if exist "%CLI_DATA%\cli\cli.exe" ren "%CLI_DATA%\cli\cli.exe" "xplor-cli.exe"
echo Packaging complete
- name: Package Definitions and Docs
shell: cmd
run: |
setlocal enabledelayedexpansion
REM Package each definition set
for %%D in (cod volition deadrising asura fmod thqa wii) do (
set "DEF_DATA=installer\packages\com.xplor.definitions.%%D\data"
if exist "!DEF_DATA!" rmdir /s /q "!DEF_DATA!"
mkdir "!DEF_DATA!\definitions\%%D" 2>nul
if exist "definitions\%%D" (
xcopy /s /e /y /q "definitions\%%D\*" "!DEF_DATA!\definitions\%%D\" >nul
)
)
REM Package docs
set DOCS_DATA=installer\packages\com.xplor.docs\data
if exist "%DOCS_DATA%" rmdir /s /q "%DOCS_DATA%"
mkdir "%DOCS_DATA%\docs"
if exist "docs\xscript-guide.pdf" copy /y "docs\xscript-guide.pdf" "%DOCS_DATA%\docs\" >nul
if exist "docs\xscript-guide.md" copy /y "docs\xscript-guide.md" "%DOCS_DATA%\docs\" >nul
REM Package scripts
set SCRIPTS_DATA=installer\packages\com.xplor.scripts\data
if exist "%SCRIPTS_DATA%" rmdir /s /q "%SCRIPTS_DATA%"
mkdir "%SCRIPTS_DATA%\scripts"
if exist "scripts" xcopy /s /e /y /q "scripts\*" "%SCRIPTS_DATA%\scripts\" >nul
echo Definitions and docs packaged
- name: Update Package Versions
shell: powershell
run: |
$VERSION = $env:CLEAN_VERSION
$CHANNEL = $env:CHANNEL
$TODAY = Get-Date -Format "yyyy-MM-dd"
Write-Host "Updating to version $VERSION for channel $CHANNEL on $TODAY"
# Update package.xml files
Get-ChildItem -Path "installer\packages" -Filter "package.xml" -Recurse | ForEach-Object {
$content = Get-Content $_.FullName -Raw
$content = $content -replace '<Version>.*?</Version>', "<Version>$VERSION</Version>"
$content = $content -replace '<ReleaseDate>.*?</ReleaseDate>', "<ReleaseDate>$TODAY</ReleaseDate>"
Set-Content -Path $_.FullName -Value $content -NoNewline
}
# Update config.xml
$configPath = "installer\config\config.xml"
$content = Get-Content $configPath -Raw
$content = $content -replace '<Version>.*?</Version>', "<Version>$VERSION</Version>"
$content = $content -replace 'repository/[^<"]*', "repository/$CHANNEL"
Set-Content -Path $configPath -Value $content -NoNewline
Write-Host "Updated versions to $VERSION for channel $CHANNEL"
- name: Generate Repository
shell: cmd
run: |
set PATH=C:\Qt\Tools\QtInstallerFramework\4.10\bin;%PATH%
if exist repository rmdir /s /q repository
mkdir repository
repogen.exe --update-new-components -p installer\packages repository
if errorlevel 1 exit /b 1
echo Repository generated
- name: Create Offline Installer
shell: cmd
run: |
set PATH=C:\Qt\Tools\QtInstallerFramework\4.10\bin;%PATH%
binarycreator.exe --offline-only -c installer\config\config.xml -p installer\packages "XPlor-%VERSION%-Windows-Setup.exe"
if errorlevel 1 exit /b 1
echo Created: XPlor-%VERSION%-Windows-Setup.exe
- name: Create Online Installer
shell: cmd
run: |
set PATH=C:\Qt\Tools\QtInstallerFramework\4.10\bin;%PATH%
binarycreator.exe --online-only -c installer\config\config.xml -p installer\packages "XPlor-%VERSION%-Windows-Online.exe"
if errorlevel 1 exit /b 1
echo Created: XPlor-%VERSION%-Windows-Online.exe
- name: Deploy to Repository
shell: cmd
continue-on-error: true
run: |
set REPO_PATH=P:\repository\%CHANNEL%
echo Deploying to %REPO_PATH%
REM Check if drive exists
if not exist "P:\" (
echo WARNING: P: drive not available, skipping local repository deployment
exit /b 0
)
if not exist "%REPO_PATH%" mkdir "%REPO_PATH%"
REM Copy repository contents
xcopy /s /e /y /q "repository\*" "%REPO_PATH%\" >nul
echo Repository updated at %REPO_PATH%
- name: Upload Installers
uses: actions/upload-artifact@v3
with:
name: windows-installers
path: |
XPlor-*-Windows-Setup.exe
XPlor-*-Windows-Online.exe
retention-days: 90
- name: Upload Repository
uses: actions/upload-artifact@v3
with:
name: windows-repository
path: repository/
retention-days: 90
# ===========================================================================
# macOS Build
# ===========================================================================
build-macos:
runs-on: macos
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version info
shell: bash
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"
if [[ "$TAG" == *"-alpha"* ]]; then
CHANNEL="alpha"
elif [[ "$TAG" == *"-test"* ]]; then
CHANNEL="tester"
else
CHANNEL="stable"
fi
CLEAN_VERSION=$(echo "$VERSION" | sed 's/-alpha.*//' | sed 's/-test.*//')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "CLEAN_VERSION=$CLEAN_VERSION" >> $GITHUB_ENV
echo "CHANNEL=$CHANNEL" >> $GITHUB_ENV
- name: Build Release
shell: bash
run: |
# Find Qt
for QT_PATH in ~/Qt/6.10.1/macos ~/Qt/6.9.0/macos ~/Qt/6.8.0/macos /opt/homebrew/opt/qt@6; do
if [ -f "$QT_PATH/bin/qmake" ]; then
echo "Found Qt at: $QT_PATH"
export PATH="$QT_PATH/bin:$PATH"
echo "QT_PATH=$QT_PATH" >> $GITHUB_ENV
break
fi
done
which qmake || { echo "ERROR: qmake not found"; exit 1; }
mkdir -p build
cd build
qmake ../XPlor.pro -spec macx-clang "CONFIG+=release"
make -j$(sysctl -n hw.ncpu)
- name: Deploy Qt Libraries
shell: bash
run: |
export PATH="$QT_PATH/bin:$PATH"
cd build/app
if [ -d "XPlor.app" ] || [ -d "app.app" ]; then
APP_NAME=$(ls -d *.app | head -1)
macdeployqt "$APP_NAME" -verbose=1
# Rename if needed
if [ "$APP_NAME" = "app.app" ]; then
mv app.app XPlor.app
fi
fi
- name: Package for Installer
shell: bash
run: |
set -x # Debug: show commands
echo "=== Starting Package for Installer ==="
echo "Current directory: $(pwd)"
echo "Build directory contents:"
ls -la build/app/ || echo "build/app not found"
GUI_DATA="installer/packages/com.xplor.gui/data"
CLI_DATA="installer/packages/com.xplor.cli/data"
rm -rf "$GUI_DATA" "$CLI_DATA"
mkdir -p "$GUI_DATA" "$CLI_DATA/cli"
# Copy app bundle
if [ -d "build/app/XPlor.app" ]; then
echo "Copying XPlor.app..."
cp -R "build/app/XPlor.app" "$GUI_DATA/"
elif [ -d "build/app/app.app" ]; then
echo "Copying app.app as XPlor.app..."
cp -R "build/app/app.app" "$GUI_DATA/XPlor.app"
else
echo "WARNING: No app bundle found"
ls -la build/app/ || true
fi
# Copy CLI
if [ -f "build/tools/cli/cli" ]; then
cp "build/tools/cli/cli" "$CLI_DATA/cli/xplor-cli"
chmod +x "$CLI_DATA/cli/xplor-cli"
else
echo "WARNING: CLI binary not found"
fi
# Package definitions (use find to avoid glob issues)
for def in cod volition deadrising asura fmod thqa wii; do
DEF_DATA="installer/packages/com.xplor.definitions.$def/data"
rm -rf "$DEF_DATA"
mkdir -p "$DEF_DATA/definitions/$def"
if [ -d "definitions/$def" ] && [ "$(ls -A definitions/$def 2>/dev/null)" ]; then
cp -R "definitions/$def/"* "$DEF_DATA/definitions/$def/" || true
fi
done
# Package docs
DOCS_DATA="installer/packages/com.xplor.docs/data"
rm -rf "$DOCS_DATA"
mkdir -p "$DOCS_DATA/docs"
[ -f "docs/xscript-guide.pdf" ] && cp "docs/xscript-guide.pdf" "$DOCS_DATA/docs/" || true
[ -f "docs/xscript-guide.md" ] && cp "docs/xscript-guide.md" "$DOCS_DATA/docs/" || true
# Package scripts (may not exist in repo)
SCRIPTS_DATA="installer/packages/com.xplor.scripts/data"
rm -rf "$SCRIPTS_DATA"
mkdir -p "$SCRIPTS_DATA/scripts"
if [ -d "scripts" ] && [ "$(ls -A scripts 2>/dev/null)" ]; then
cp -R scripts/* "$SCRIPTS_DATA/scripts/" || true
fi
echo "=== Package for Installer complete ==="
- name: Update Package Versions
shell: bash
run: |
VERSION="${{ env.CLEAN_VERSION }}"
CHANNEL="${{ env.CHANNEL }}"
TODAY=$(date +%Y-%m-%d)
echo "Updating to version $VERSION for channel $CHANNEL on $TODAY"
# Update package.xml files
find installer/packages -name "package.xml" -exec sed -i '' \
-e "s|<Version>.*</Version>|<Version>$VERSION</Version>|" \
-e "s|<ReleaseDate>.*</ReleaseDate>|<ReleaseDate>$TODAY</ReleaseDate>|" {} \;
# Update config.xml
if [ -f "installer/config/config.xml" ]; then
sed -i '' \
-e "s|<Version>.*</Version>|<Version>$VERSION</Version>|" \
-e "s|repository/[^<\"]*|repository/$CHANNEL|" \
installer/config/config.xml
else
echo "WARNING: installer/config/config.xml not found"
fi
echo "Updated versions to $VERSION for channel $CHANNEL"
- name: Generate Repository and Installers
shell: bash
run: |
# Find Qt IFW (macOS uses 4.10 at ~/Qt/Tools/QtInstallerFramework/bin)
for IFW_PATH in ~/Qt/Tools/QtInstallerFramework/bin ~/Qt/Tools/QtInstallerFramework/4.10/bin /opt/homebrew/opt/qt-installer-framework/bin; do
if [ -f "$IFW_PATH/repogen" ]; then
echo "Found Qt IFW at: $IFW_PATH"
export PATH="$IFW_PATH:$PATH"
break
fi
done
which repogen || { echo "ERROR: Qt IFW not found"; exit 1; }
# Generate repository
rm -rf repository
mkdir repository
repogen --update-new-components -p installer/packages repository
# Create offline installer
binarycreator --offline-only -c installer/config/config.xml -p installer/packages "XPlor-${VERSION}-macOS-Setup"
# Create online installer
binarycreator --online-only -c installer/config/config.xml -p installer/packages "XPlor-${VERSION}-macOS-Online"
# Create DMG for offline installer
if [ -d "XPlor-${VERSION}-macOS-Setup.app" ]; then
hdiutil create -volname "XPlor Installer" -srcfolder "XPlor-${VERSION}-macOS-Setup.app" -ov -format UDZO "XPlor-${VERSION}-macOS-Setup.dmg"
fi
if [ -d "XPlor-${VERSION}-macOS-Online.app" ]; then
hdiutil create -volname "XPlor Online Installer" -srcfolder "XPlor-${VERSION}-macOS-Online.app" -ov -format UDZO "XPlor-${VERSION}-macOS-Online.dmg"
fi
ls -la XPlor-*
- name: Upload Installers
uses: actions/upload-artifact@v3
with:
name: macos-installers
path: |
XPlor-*-macOS-Setup.dmg
XPlor-*-macOS-Online.dmg
XPlor-*-macOS-Setup
XPlor-*-macOS-Online
retention-days: 90
- name: Upload Repository
uses: actions/upload-artifact@v3
with:
name: macos-repository
path: repository/
retention-days: 90
# ===========================================================================
# Linux Build
# ===========================================================================
build-linux:
runs-on: ubuntu
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
shell: bash
run: |
if command -v sudo &> /dev/null; then
SUDO="sudo"
else
SUDO=""
fi
$SUDO apt-get update || true
$SUDO apt-get install -y build-essential libgl1-mesa-dev zlib1g-dev
- name: Extract version info
shell: bash
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"
if [[ "$TAG" == *"-alpha"* ]]; then
CHANNEL="alpha"
elif [[ "$TAG" == *"-test"* ]]; then
CHANNEL="tester"
else
CHANNEL="stable"
fi
CLEAN_VERSION=$(echo "$VERSION" | sed 's/-alpha.*//' | sed 's/-test.*//')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "CLEAN_VERSION=$CLEAN_VERSION" >> $GITHUB_ENV
echo "CHANNEL=$CHANNEL" >> $GITHUB_ENV
- name: Build Release
shell: bash
run: |
# Find Qt
for QT_PATH in ~/Qt/6.10.1/gcc_64 ~/Qt/6.9.0/gcc_64 ~/Qt/6.8.0/gcc_64 /opt/Qt/6.10.1/gcc_64 /usr/lib/qt6; do
if [ -f "$QT_PATH/bin/qmake" ]; then
echo "Found Qt at: $QT_PATH"
export PATH="$QT_PATH/bin:$PATH"
export LD_LIBRARY_PATH="$QT_PATH/lib:$LD_LIBRARY_PATH"
echo "QT_PATH=$QT_PATH" >> $GITHUB_ENV
break
fi
done
which qmake || { echo "ERROR: qmake not found"; exit 1; }
mkdir -p build
cd build
qmake ../XPlor.pro -spec linux-g++ "CONFIG+=release"
make -j$(nproc)
- name: Package for Installer
shell: bash
run: |
set -x # Debug: show commands
echo "=== Starting Package for Installer (Linux) ==="
GUI_DATA="installer/packages/com.xplor.gui/data"
CLI_DATA="installer/packages/com.xplor.cli/data"
rm -rf "$GUI_DATA" "$CLI_DATA"
mkdir -p "$GUI_DATA" "$CLI_DATA/cli"
# Copy GUI binary and create wrapper script
if [ -f "build/app/app" ]; then
cp "build/app/app" "$GUI_DATA/XPlor"
chmod +x "$GUI_DATA/XPlor"
else
echo "WARNING: GUI binary not found"
fi
# Copy CLI
if [ -f "build/tools/cli/cli" ]; then
cp "build/tools/cli/cli" "$CLI_DATA/cli/xplor-cli"
chmod +x "$CLI_DATA/cli/xplor-cli"
else
echo "WARNING: CLI binary not found"
fi
# Copy Qt libraries (basic deployment)
if [ -n "$QT_PATH" ] && [ -d "$QT_PATH/lib" ]; then
mkdir -p "$GUI_DATA/lib"
for lib in Core Gui Widgets Network Multimedia Svg; do
[ -f "$QT_PATH/lib/libQt6${lib}.so.6" ] && cp "$QT_PATH/lib/libQt6${lib}.so.6" "$GUI_DATA/lib/"
done
# Copy plugins
mkdir -p "$GUI_DATA/plugins/platforms"
[ -d "$QT_PATH/plugins/platforms" ] && cp "$QT_PATH/plugins/platforms/"*.so "$GUI_DATA/plugins/platforms/" 2>/dev/null || true
fi
# Package definitions (check for non-empty directories)
for def in cod volition deadrising asura fmod thqa wii; do
DEF_DATA="installer/packages/com.xplor.definitions.$def/data"
rm -rf "$DEF_DATA"
mkdir -p "$DEF_DATA/definitions/$def"
if [ -d "definitions/$def" ] && [ "$(ls -A definitions/$def 2>/dev/null)" ]; then
cp -R "definitions/$def/"* "$DEF_DATA/definitions/$def/" || true
fi
done
# Package docs
DOCS_DATA="installer/packages/com.xplor.docs/data"
rm -rf "$DOCS_DATA"
mkdir -p "$DOCS_DATA/docs"
[ -f "docs/xscript-guide.pdf" ] && cp "docs/xscript-guide.pdf" "$DOCS_DATA/docs/" || true
[ -f "docs/xscript-guide.md" ] && cp "docs/xscript-guide.md" "$DOCS_DATA/docs/" || true
# Package scripts (may not exist in repo)
SCRIPTS_DATA="installer/packages/com.xplor.scripts/data"
rm -rf "$SCRIPTS_DATA"
mkdir -p "$SCRIPTS_DATA/scripts"
if [ -d "scripts" ] && [ "$(ls -A scripts 2>/dev/null)" ]; then
cp -R scripts/* "$SCRIPTS_DATA/scripts/" || true
fi
echo "=== Package for Installer complete ==="
- name: Update Package Versions
shell: bash
run: |
VERSION="${{ env.CLEAN_VERSION }}"
CHANNEL="${{ env.CHANNEL }}"
TODAY=$(date +%Y-%m-%d)
echo "Updating to version $VERSION for channel $CHANNEL on $TODAY"
# Update package.xml files
find installer/packages -name "package.xml" -exec sed -i \
-e "s|<Version>.*</Version>|<Version>$VERSION</Version>|" \
-e "s|<ReleaseDate>.*</ReleaseDate>|<ReleaseDate>$TODAY</ReleaseDate>|" {} \;
# Update config.xml
if [ -f "installer/config/config.xml" ]; then
sed -i \
-e "s|<Version>.*</Version>|<Version>$VERSION</Version>|" \
-e "s|repository/[^<\"]*|repository/$CHANNEL|" \
installer/config/config.xml
else
echo "WARNING: installer/config/config.xml not found"
fi
echo "Updated versions to $VERSION for channel $CHANNEL"
- name: Generate Repository and Installers
shell: bash
run: |
# Find Qt IFW
for IFW_PATH in ~/Qt/Tools/QtInstallerFramework/4.8/bin ~/Qt/Tools/QtInstallerFramework/4.7/bin /opt/Qt/Tools/QtInstallerFramework/4.8/bin; do
if [ -f "$IFW_PATH/repogen" ]; then
echo "Found Qt IFW at: $IFW_PATH"
export PATH="$IFW_PATH:$PATH"
break
fi
done
which repogen || { echo "ERROR: Qt IFW not found"; exit 1; }
# Generate repository
rm -rf repository
mkdir repository
repogen --update-new-components -p installer/packages repository
# Create offline installer (.run)
binarycreator --offline-only -c installer/config/config.xml -p installer/packages "XPlor-${VERSION}-Linux-Setup.run"
# Create online installer (.run)
binarycreator --online-only -c installer/config/config.xml -p installer/packages "XPlor-${VERSION}-Linux-Online.run"
chmod +x XPlor-*.run
ls -la XPlor-*
- name: Upload Installers
uses: actions/upload-artifact@v3
with:
name: linux-installers
path: |
XPlor-*-Linux-Setup.run
XPlor-*-Linux-Online.run
retention-days: 90
- name: Upload Repository
uses: actions/upload-artifact@v3
with:
name: linux-repository
path: repository/
retention-days: 90
# ===========================================================================
# Deploy - Merge repositories and create release
# ===========================================================================
deploy:
runs-on: ubuntu
needs: [build-windows, build-macos, build-linux]
steps:
- name: Extract version info
shell: bash
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"
if [[ "$TAG" == *"-alpha"* ]]; then
CHANNEL="alpha"
elif [[ "$TAG" == *"-test"* ]]; then
CHANNEL="tester"
else
CHANNEL="stable"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "CHANNEL=$CHANNEL" >> $GITHUB_ENV
- name: Download all installers
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Download macOS repository
uses: actions/download-artifact@v3
with:
name: macos-repository
path: repo-macos
- name: Download Linux repository
uses: actions/download-artifact@v3
with:
name: linux-repository
path: repo-linux
- name: Download Windows repository
uses: actions/download-artifact@v3
with:
name: windows-repository
path: repo-windows
- name: Merge repositories
shell: bash
run: |
REPO_PATH="/repository/${CHANNEL}"
echo "Deploying to: $REPO_PATH"
# Check if repository directory exists
if [ ! -d "/repository" ]; then
echo "WARNING: /repository not available, skipping repository deployment"
exit 0
fi
# Ensure channel directory exists
mkdir -p "$REPO_PATH"
# Merge all platform repositories
if [ -d "repo-windows" ]; then
cp -r repo-windows/* "$REPO_PATH/" 2>/dev/null || true
echo "Merged Windows repository"
fi
if [ -d "repo-macos" ]; then
cp -r repo-macos/* "$REPO_PATH/" 2>/dev/null || true
echo "Merged macOS repository"
fi
if [ -d "repo-linux" ]; then
cp -r repo-linux/* "$REPO_PATH/" 2>/dev/null || true
echo "Merged Linux repository"
fi
echo "Repository deployed to $REPO_PATH"
ls -la "$REPO_PATH" || true
- name: Collect all installers
shell: bash
run: |
mkdir -p release
# Copy all installers from artifacts
find artifacts -type f \( -name "XPlor-*.exe" -o -name "XPlor-*.dmg" -o -name "XPlor-*.run" \) -exec cp {} release/ \;
echo "Collected installers:"
ls -la release/
- name: Create Gitea Release
uses: softprops/action-gh-release@v1
with:
files: release/*
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'test') }}
body: |
Release ${{ github.ref_name }}
## Downloads
- **Windows**: XPlor-*-Windows-Setup.exe (offline), XPlor-*-Windows-Online.exe
- **macOS**: XPlor-*-macOS-Setup.dmg (offline), XPlor-*-macOS-Online.dmg
- **Linux**: XPlor-*-Linux-Setup.run (offline), XPlor-*-Linux-Online.run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}