chore: add electron verification steps for self-hosted runner

This commit is contained in:
Wendong-Fan 2026-01-22 00:15:47 +08:00
parent 817b2dc9f4
commit e8a7e779fa
2 changed files with 88 additions and 0 deletions

View file

@ -41,6 +41,13 @@ jobs:
with:
clean: true
# Clean node_modules on self-hosted runner to ensure fresh install
- name: Clean node_modules (self-hosted)
if: contains(matrix.os, 'self-hosted')
run: |
rm -rf node_modules
rm -rf release
- name: Setup Node.js
if: "!contains(matrix.os, 'self-hosted')"
uses: actions/setup-node@v6
@ -61,6 +68,20 @@ jobs:
- name: Install Dependencies
run: npm install
# Verify Electron installation on macOS
- name: Verify Electron Installation (macOS)
if: runner.os == 'macOS'
run: |
echo "Checking Electron installation..."
ls -la node_modules/electron/dist/ || echo "Electron dist not found"
if [ -d "node_modules/electron/dist/Electron.app" ]; then
echo "✅ Electron.app found"
ls -la "node_modules/electron/dist/Electron.app/Contents/Frameworks/" | head -5
else
echo "❌ Electron.app NOT found - this will cause build failure"
exit 1
fi
# Install libfuse2 for Linux AppImage builds
- name: Install libfuse2 (Linux)
if: runner.os == 'Linux'
@ -106,6 +127,29 @@ jobs:
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
# Verify built app contains Electron Framework
- name: Verify Built App (macOS)
if: runner.os == 'macOS'
run: |
echo "Checking built app..."
APP_PATH=$(find release -name "*.app" -type d | head -1)
if [ -n "$APP_PATH" ]; then
echo "Found app at: $APP_PATH"
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
if [ -d "$FRAMEWORKS_PATH/Electron Framework.framework" ]; then
echo "✅ Electron Framework found"
ls -la "$FRAMEWORKS_PATH/" | head -10
else
echo "❌ Electron Framework NOT found in built app!"
echo "Contents of Frameworks directory:"
ls -la "$FRAMEWORKS_PATH/" 2>/dev/null || echo "Frameworks directory does not exist"
exit 1
fi
else
echo "No .app found in release directory"
ls -la release/
fi
- name: Upload Artifact
uses: actions/upload-artifact@v6
with: