Merge branch 'main' into codex/run-release.yml-to-simulate-github-actions-8hwayv
This commit is contained in:
@@ -114,48 +114,6 @@ jobs:
|
||||
name: metapi-dist-${{ github.sha }}
|
||||
path: dist
|
||||
|
||||
|
||||
- name: Normalize downloaded dist layout (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
if (Test-Path 'dist/desktop/main.js') {
|
||||
exit 0
|
||||
}
|
||||
if (Test-Path 'dist/dist/desktop/main.js') {
|
||||
Copy-Item 'dist/dist/*' 'dist/' -Recurse -Force
|
||||
Remove-Item 'dist/dist' -Recurse -Force
|
||||
exit 0
|
||||
}
|
||||
if ((Test-Path 'desktop/main.js') -or (Test-Path 'web/index.html') -or (Test-Path 'server/index.js')) {
|
||||
New-Item -ItemType Directory -Path 'dist' -Force | Out-Null
|
||||
if (Test-Path 'desktop') { Move-Item 'desktop' 'dist/' -Force }
|
||||
if (Test-Path 'web') { Move-Item 'web' 'dist/' -Force }
|
||||
if (Test-Path 'server') { Move-Item 'server' 'dist/' -Force }
|
||||
}
|
||||
if (-not (Test-Path 'dist/desktop/main.js')) {
|
||||
throw 'Missing dist/desktop/main.js after downloading dist artifact'
|
||||
}
|
||||
|
||||
- name: Normalize downloaded dist layout (Linux/macOS)
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -f dist/desktop/main.js ]; then
|
||||
exit 0
|
||||
fi
|
||||
if [ -f dist/dist/desktop/main.js ]; then
|
||||
cp -R dist/dist/. dist/
|
||||
rm -rf dist/dist
|
||||
elif [ -f desktop/main.js ] || [ -f web/index.html ] || [ -f server/index.js ]; then
|
||||
mkdir -p dist
|
||||
[ -d desktop ] && mv desktop dist/
|
||||
[ -d web ] && mv web dist/
|
||||
[ -d server ] && mv server dist/
|
||||
fi
|
||||
test -f dist/desktop/main.js
|
||||
|
||||
- name: Build desktop artifacts (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
|
||||
Reference in New Issue
Block a user