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