Compare commits

...

5 Commits

Author SHA1 Message Date
njohnson
b046d12c09 Disable CI workflow, keep only tag-triggered releases
Some checks failed
Release / build-macos (push) Failing after 41s
Release / build-linux (push) Failing after 1m17s
Release / build-windows (push) Failing after 1m17s
Release / deploy (push) Has been skipped
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:44:51 -05:00
njohnson
aef254bf04 Convert Windows bash steps to CMD
Some checks failed
CI Build / build-macos (push) Successful in 28s
Release / build-macos (push) Failing after 34s
Release / build-linux (push) Failing after 1m20s
CI Build / build-windows (push) Successful in 1m36s
CI Build / build-ubuntu (push) Has been cancelled
Release / build-windows (push) Failing after 1m38s
Release / deploy (push) Has been skipped
- Replace bash with cmd for all Windows runner steps
- Use setlocal enabledelayedexpansion for variable expansion
- Use findstr for string matching instead of bash [[ ]]
- Use xcopy/copy instead of cp
- Use powershell inline for sed-like regex replacements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:41:48 -05:00
njohnson
679ff06a57 Fix Package for Installer steps with safer glob handling
Some checks failed
CI Build / build-macos (push) Successful in 27s
Release / build-windows (push) Failing after 38s
Release / build-macos (push) Failing after 36s
CI Build / build-windows (push) Successful in 1m30s
CI Build / build-ubuntu (push) Has been cancelled
Release / build-linux (push) Failing after 3m31s
Release / deploy (push) Has been skipped
- Add debug output to diagnose build failures
- Handle empty directories gracefully with || true
- Add fallback for app.app -> XPlor.app rename on macOS
- Check for non-empty directories before glob copy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:38:39 -05:00
njohnson
384070fad6 Revert release workflow to use bash on Windows
Some checks failed
CI Build / build-windows (push) Has been cancelled
CI Build / build-ubuntu (push) Has been cancelled
CI Build / build-macos (push) Has been cancelled
Release / build-macos (push) Failing after 35s
Release / build-linux (push) Failing after 10m59s
Release / build-windows (push) Failing after 38s
Release / deploy (push) Has been skipped
Bash is now available on the Windows runner. Reverted all PowerShell
(pwsh) steps back to bash for consistency across platforms.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:04:20 -05:00
njohnson
2c1abead2f Fix Windows release workflow - use PowerShell instead of bash
Some checks failed
CI Build / build-macos (push) Successful in 33s
Release / build-windows (push) Failing after 54s
Release / build-macos (push) Failing after 39s
CI Build / build-ubuntu (push) Successful in 1m30s
CI Build / build-windows (push) Successful in 1m45s
Release / build-linux (push) Failing after 8m37s
Release / deploy (push) Has been skipped
The Windows runner doesn't have bash in PATH. Convert the "Extract
version info" steps in build-windows and deploy jobs from bash to
PowerShell (pwsh) syntax.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:48:10 -05:00
2 changed files with 131 additions and 97 deletions

View File

@ -1,10 +1,14 @@
name: CI Build
# Disabled for now - only release workflow (tag-triggered) is active
# on:
# push:
# branches:
# - '**'
# pull_request:
on:
push:
branches:
- '**'
pull_request:
workflow_dispatch: # Manual trigger only
jobs:
build-windows:

View File

@ -24,27 +24,25 @@ jobs:
arch: x64
- name: Extract version info
shell: bash
shell: cmd
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"
setlocal enabledelayedexpansion
# Determine channel from tag
if [[ "$TAG" == *"-alpha"* ]]; then
CHANNEL="alpha"
elif [[ "$TAG" == *"-test"* ]]; then
CHANNEL="tester"
else
CHANNEL="stable"
fi
set "TAG=%GITHUB_REF_NAME%"
set "VERSION=!TAG:~1!"
# Clean version (remove -alpha1, -test2 suffixes for display)
CLEAN_VERSION=$(echo "$VERSION" | sed 's/-alpha.*//' | sed 's/-test.*//')
set "CHANNEL=stable"
echo !TAG! | findstr /C:"-alpha" >nul && set "CHANNEL=alpha"
echo !TAG! | findstr /C:"-test" >nul && set "CHANNEL=tester"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "CLEAN_VERSION=$CLEAN_VERSION" >> $GITHUB_ENV
echo "CHANNEL=$CHANNEL" >> $GITHUB_ENV
echo "Building version: $VERSION for channel: $CHANNEL"
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
@ -133,28 +131,30 @@ jobs:
echo Definitions and docs packaged
- name: Update Package Versions
shell: pwsh
shell: cmd
run: |
$version = "${{ env.CLEAN_VERSION }}"
$channel = "${{ env.CHANNEL }}"
$today = Get-Date -Format "yyyy-MM-dd"
setlocal enabledelayedexpansion
# Update all package.xml files
Get-ChildItem -Path "installer\packages\*\meta\package.xml" | 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 $_.FullName $content
}
set "VERSION=%CLEAN_VERSION%"
set "CHANNEL=%CHANNEL%"
# 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 $configPath $content
REM Get today's date in YYYY-MM-DD format
for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /value') do set "DT=%%I"
set "TODAY=!DT:~0,4!-!DT:~4,2!-!DT:~6,2!"
Write-Host "Updated versions to $version for channel $channel"
echo Updating to version !VERSION! for channel !CHANNEL! on !TODAY!
REM Update package.xml files using PowerShell for regex
for /r installer\packages %%f in (package.xml) do (
if exist "%%f" (
powershell -Command "(Get-Content '%%f') -replace '<Version>.*</Version>', '<Version>%VERSION%</Version>' -replace '<ReleaseDate>.*</ReleaseDate>', '<ReleaseDate>%TODAY%</ReleaseDate>' | Set-Content '%%f'"
)
)
REM Update config.xml
powershell -Command "(Get-Content 'installer\config\config.xml') -replace '<Version>.*</Version>', '<Version>%VERSION%</Version>' -replace 'repository/[^<\"]*', 'repository/%CHANNEL%' | Set-Content 'installer\config\config.xml'"
echo Updated versions to !VERSION! for channel !CHANNEL!
- name: Generate Repository
shell: cmd
@ -282,6 +282,13 @@ jobs:
- 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"
@ -290,22 +297,31 @@ jobs:
# 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
# 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" ]; then
cp -R "definitions/$def/"* "$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
@ -313,14 +329,18 @@ jobs:
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/"
[ -f "docs/xscript-guide.md" ] && cp "docs/xscript-guide.md" "$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
# Package scripts (may not exist in repo)
SCRIPTS_DATA="installer/packages/com.xplor.scripts/data"
rm -rf "$SCRIPTS_DATA"
mkdir -p "$SCRIPTS_DATA/scripts"
[ -d "scripts" ] && cp -R scripts/* "$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
@ -461,6 +481,10 @@ jobs:
- 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"
@ -471,12 +495,16 @@ jobs:
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)
@ -491,13 +519,13 @@ jobs:
[ -d "$QT_PATH/plugins/platforms" ] && cp "$QT_PATH/plugins/platforms/"*.so "$GUI_DATA/plugins/platforms/" 2>/dev/null || true
fi
# Package definitions
# 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" ]; then
cp -R "definitions/$def/"* "$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
@ -505,14 +533,18 @@ jobs:
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/"
[ -f "docs/xscript-guide.md" ] && cp "docs/xscript-guide.md" "$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
# Package scripts (may not exist in repo)
SCRIPTS_DATA="installer/packages/com.xplor.scripts/data"
rm -rf "$SCRIPTS_DATA"
mkdir -p "$SCRIPTS_DATA/scripts"
[ -d "scripts" ] && cp -R scripts/* "$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
@ -585,21 +617,19 @@ jobs:
steps:
- name: Extract version info
shell: bash
shell: cmd
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"
setlocal enabledelayedexpansion
if [[ "$TAG" == *"-alpha"* ]]; then
CHANNEL="alpha"
elif [[ "$TAG" == *"-test"* ]]; then
CHANNEL="tester"
else
CHANNEL="stable"
fi
set "TAG=%GITHUB_REF_NAME%"
set "VERSION=!TAG:~1!"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "CHANNEL=$CHANNEL" >> $GITHUB_ENV
set "CHANNEL=stable"
echo !TAG! | findstr /C:"-alpha" >nul && set "CHANNEL=alpha"
echo !TAG! | findstr /C:"-test" >nul && set "CHANNEL=tester"
echo VERSION=!VERSION!>> %GITHUB_ENV%
echo CHANNEL=!CHANNEL!>> %GITHUB_ENV%
- name: Download all installers
uses: actions/download-artifact@v4
@ -619,50 +649,50 @@ jobs:
path: repo-linux
- name: Merge repositories
shell: pwsh
shell: cmd
run: |
$channel = "${{ env.CHANNEL }}"
$repoPath = "P:\repository\$channel"
setlocal enabledelayedexpansion
Write-Host "Deploying to: $repoPath"
set "CHANNEL=%CHANNEL%"
set "REPO_PATH=P:\repository\!CHANNEL!"
# Ensure directory exists
if (-not (Test-Path $repoPath)) {
New-Item -ItemType Directory -Path $repoPath -Force
}
echo Deploying to: !REPO_PATH!
# The Windows build already deployed its repository
# Now merge macOS and Linux platform-specific packages
REM Ensure directory exists
if not exist "!REPO_PATH!" mkdir "!REPO_PATH!"
# Copy macOS repository components
if (Test-Path "repo-macos") {
Copy-Item -Path "repo-macos\*" -Destination $repoPath -Recurse -Force
Write-Host "Merged macOS repository"
}
REM The Windows build already deployed its repository
REM Now merge macOS and Linux platform-specific packages
# Copy Linux repository components
if (Test-Path "repo-linux") {
Copy-Item -Path "repo-linux\*" -Destination $repoPath -Recurse -Force
Write-Host "Merged Linux repository"
}
REM Copy macOS repository components
if exist "repo-macos" (
xcopy /s /e /y /q "repo-macos\*" "!REPO_PATH!\" >nul
echo Merged macOS repository
)
Write-Host "Repository deployed to $repoPath"
REM Copy Linux repository components
if exist "repo-linux" (
xcopy /s /e /y /q "repo-linux\*" "!REPO_PATH!\" >nul
echo Merged Linux repository
)
echo Repository deployed to !REPO_PATH!
- name: Collect all installers
shell: pwsh
shell: cmd
run: |
# Create release directory
New-Item -ItemType Directory -Path "release" -Force
REM Create release directory
if not exist release mkdir release
# Copy all installers from artifacts
Get-ChildItem -Path "artifacts" -Recurse -File | Where-Object {
$_.Name -match "XPlor-.*\.(exe|dmg|run)$"
} | ForEach-Object {
Copy-Item $_.FullName -Destination "release\"
Write-Host "Found: $($_.Name)"
}
REM Copy all installers from artifacts
for /r artifacts %%f in (XPlor-*.exe XPlor-*.dmg XPlor-*.run) do (
if exist "%%f" (
copy /y "%%f" release\ >nul
echo Found: %%~nxf
)
)
Get-ChildItem "release"
dir release\
- name: Create Gitea Release
uses: softprops/action-gh-release@v2