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
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>
This commit is contained in:
parent
2c1abead2f
commit
384070fad6
@ -24,27 +24,25 @@ jobs:
|
||||
arch: x64
|
||||
|
||||
- name: Extract version info
|
||||
shell: pwsh
|
||||
shell: bash
|
||||
run: |
|
||||
$tag = "${{ github.ref_name }}"
|
||||
$version = $tag -replace '^v', ''
|
||||
TAG="${GITHUB_REF_NAME}"
|
||||
VERSION="${TAG#v}"
|
||||
|
||||
# Determine channel from tag
|
||||
if ($tag -match '-alpha') {
|
||||
$channel = "alpha"
|
||||
} elseif ($tag -match '-test') {
|
||||
$channel = "tester"
|
||||
} else {
|
||||
$channel = "stable"
|
||||
}
|
||||
if [[ "$TAG" == *"-alpha"* ]]; then
|
||||
CHANNEL="alpha"
|
||||
elif [[ "$TAG" == *"-test"* ]]; then
|
||||
CHANNEL="tester"
|
||||
else
|
||||
CHANNEL="stable"
|
||||
fi
|
||||
|
||||
# Clean version (remove -alpha1, -test2 suffixes for display)
|
||||
$cleanVersion = $version -replace '-alpha.*', '' -replace '-test.*', ''
|
||||
CLEAN_VERSION=$(echo "$VERSION" | sed 's/-alpha.*//' | sed 's/-test.*//')
|
||||
|
||||
echo "VERSION=$version" >> $env:GITHUB_ENV
|
||||
echo "CLEAN_VERSION=$cleanVersion" >> $env:GITHUB_ENV
|
||||
echo "CHANNEL=$channel" >> $env:GITHUB_ENV
|
||||
Write-Host "Building version: $version for channel: $channel"
|
||||
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,25 @@ jobs:
|
||||
echo Definitions and docs packaged
|
||||
|
||||
- name: Update Package Versions
|
||||
shell: pwsh
|
||||
shell: bash
|
||||
run: |
|
||||
$version = "${{ env.CLEAN_VERSION }}"
|
||||
$channel = "${{ env.CHANNEL }}"
|
||||
$today = Get-Date -Format "yyyy-MM-dd"
|
||||
VERSION="${{ env.CLEAN_VERSION }}"
|
||||
CHANNEL="${{ env.CHANNEL }}"
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
# 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
|
||||
}
|
||||
for f in installer/packages/*/meta/package.xml; do
|
||||
if [ -f "$f" ]; then
|
||||
sed -i "s|<Version>.*</Version>|<Version>$VERSION</Version>|" "$f"
|
||||
sed -i "s|<ReleaseDate>.*</ReleaseDate>|<ReleaseDate>$TODAY</ReleaseDate>|" "$f"
|
||||
fi
|
||||
done
|
||||
|
||||
# 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
|
||||
sed -i "s|<Version>.*</Version>|<Version>$VERSION</Version>|" installer/config/config.xml
|
||||
sed -i "s|repository/[^<\"]*|repository/$CHANNEL|" installer/config/config.xml
|
||||
|
||||
Write-Host "Updated versions to $version for channel $channel"
|
||||
echo "Updated versions to $VERSION for channel $CHANNEL"
|
||||
|
||||
- name: Generate Repository
|
||||
shell: cmd
|
||||
@ -585,21 +580,21 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Extract version info
|
||||
shell: pwsh
|
||||
shell: bash
|
||||
run: |
|
||||
$tag = "${{ github.ref_name }}"
|
||||
$version = $tag -replace '^v', ''
|
||||
TAG="${GITHUB_REF_NAME}"
|
||||
VERSION="${TAG#v}"
|
||||
|
||||
if ($tag -match '-alpha') {
|
||||
$channel = "alpha"
|
||||
} elseif ($tag -match '-test') {
|
||||
$channel = "tester"
|
||||
} else {
|
||||
$channel = "stable"
|
||||
}
|
||||
if [[ "$TAG" == *"-alpha"* ]]; then
|
||||
CHANNEL="alpha"
|
||||
elif [[ "$TAG" == *"-test"* ]]; then
|
||||
CHANNEL="tester"
|
||||
else
|
||||
CHANNEL="stable"
|
||||
fi
|
||||
|
||||
echo "VERSION=$version" >> $env:GITHUB_ENV
|
||||
echo "CHANNEL=$channel" >> $env:GITHUB_ENV
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "CHANNEL=$CHANNEL" >> $GITHUB_ENV
|
||||
|
||||
- name: Download all installers
|
||||
uses: actions/download-artifact@v4
|
||||
@ -619,50 +614,46 @@ jobs:
|
||||
path: repo-linux
|
||||
|
||||
- name: Merge repositories
|
||||
shell: pwsh
|
||||
shell: bash
|
||||
run: |
|
||||
$channel = "${{ env.CHANNEL }}"
|
||||
$repoPath = "P:\repository\$channel"
|
||||
CHANNEL="${{ env.CHANNEL }}"
|
||||
REPO_PATH="/p/repository/$CHANNEL"
|
||||
|
||||
Write-Host "Deploying to: $repoPath"
|
||||
echo "Deploying to: $REPO_PATH"
|
||||
|
||||
# Ensure directory exists
|
||||
if (-not (Test-Path $repoPath)) {
|
||||
New-Item -ItemType Directory -Path $repoPath -Force
|
||||
}
|
||||
mkdir -p "$REPO_PATH"
|
||||
|
||||
# The Windows build already deployed its repository
|
||||
# Now merge macOS and Linux platform-specific packages
|
||||
|
||||
# Copy macOS repository components
|
||||
if (Test-Path "repo-macos") {
|
||||
Copy-Item -Path "repo-macos\*" -Destination $repoPath -Recurse -Force
|
||||
Write-Host "Merged macOS repository"
|
||||
}
|
||||
if [ -d "repo-macos" ]; then
|
||||
cp -r repo-macos/* "$REPO_PATH/"
|
||||
echo "Merged macOS repository"
|
||||
fi
|
||||
|
||||
# Copy Linux repository components
|
||||
if (Test-Path "repo-linux") {
|
||||
Copy-Item -Path "repo-linux\*" -Destination $repoPath -Recurse -Force
|
||||
Write-Host "Merged Linux repository"
|
||||
}
|
||||
if [ -d "repo-linux" ]; then
|
||||
cp -r repo-linux/* "$REPO_PATH/"
|
||||
echo "Merged Linux repository"
|
||||
fi
|
||||
|
||||
Write-Host "Repository deployed to $repoPath"
|
||||
echo "Repository deployed to $REPO_PATH"
|
||||
|
||||
- name: Collect all installers
|
||||
shell: pwsh
|
||||
shell: bash
|
||||
run: |
|
||||
# Create release directory
|
||||
New-Item -ItemType Directory -Path "release" -Force
|
||||
mkdir -p 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)"
|
||||
}
|
||||
find artifacts -type f \( -name "XPlor-*.exe" -o -name "XPlor-*.dmg" -o -name "XPlor-*.run" \) | while read f; do
|
||||
cp "$f" release/
|
||||
echo "Found: $(basename "$f")"
|
||||
done
|
||||
|
||||
Get-ChildItem "release"
|
||||
ls -la release/
|
||||
|
||||
- name: Create Gitea Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user