From 2be5e5c6ad39c66ac2089b0c226a1f33b55a4686 Mon Sep 17 00:00:00 2001 From: mj Date: Fri, 18 Oct 2024 22:15:29 +0900 Subject: [PATCH] Refactor build command in windows-build.yml: Remove pnpm version specification and update NSIS installation with x64 architecture support --- .github/workflows/electron-build.yaml | 103 -------------------------- 1 file changed, 103 deletions(-) delete mode 100644 .github/workflows/electron-build.yaml diff --git a/.github/workflows/electron-build.yaml b/.github/workflows/electron-build.yaml deleted file mode 100644 index b1aec59f..00000000 --- a/.github/workflows/electron-build.yaml +++ /dev/null @@ -1,103 +0,0 @@ -name: electron-build -on: push - -jobs: - release: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - node-version: [18.x] - - steps: - - name: Check out Git repository - uses: actions/checkout@v4 - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 9.4.0 - - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - name: Setup pnpm cache - uses: actions/cache@v3 - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm install - - - name: Install NSIS (Windows) - if: runner.os == 'Windows' - run: | - choco install nsis -y - echo "C:\Program Files (x86)\NSIS" >> $env:GITHUB_PATH - - - name: Verify NSIS installation (Windows) - if: runner.os == 'Windows' - run: | - Get-Command makensis.exe - makensis.exe /VERSION - - - name: Clear electron-builder cache (Windows) - if: runner.os == 'Windows' - run: | - Remove-Item -Path "$env:USERPROFILE\AppData\Local\electron-builder\cache" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "$env:USERPROFILE\.electron-gyp" -Recurse -Force -ErrorAction SilentlyContinue - - - name: Deploy native project - run: pnpm --filter @codepair/native deploy ./standalone-native - - - name: Build/release Electron app (macOS and Linux) - if: runner.os != 'Windows' - env: - GH_TOKEN: ${{ secrets.github_token }} - DEBUG: electron-builder - working-directory: ./standalone-native - run: pnpm run release - - - name: Build/release Electron app (Windows) - if: runner.os == 'Windows' - env: - GH_TOKEN: ${{ secrets.github_token }} - DEBUG: electron-builder,electron-builder:* - working-directory: ./standalone-native - run: | - $env:PATH = "C:\Program Files (x86)\NSIS;$env:PATH" - $nsisPath = "C:\Program Files (x86)\NSIS" - $configPath = "electron-builder.yml" - @" - nsis: - oneClick: false - perMachine: false - allowToChangeInstallationDirectory: true - npmRebuild: false - "@ | Out-File -FilePath $configPath -Encoding utf8 - - # Debug information - Write-Host "NSIS Path: $nsisPath" - Write-Host "PATH environment variable:" - $env:PATH -split ';' | ForEach-Object { Write-Host $_ } - - Write-Host "electron-builder version:" - pnpm electron-builder --version - - Write-Host "Content of electron-builder.yml:" - Get-Content $configPath - - # Run electron-builder with maximum debug output - $env:ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES = "true" - pnpm electron-builder --win --x64 --publish always --config $configPath