diff --git a/.github/workflows/electron-release.yml b/.github/workflows/electron-release.yml new file mode 100644 index 0000000000..a4db96a01d --- /dev/null +++ b/.github/workflows/electron-release.yml @@ -0,0 +1,65 @@ +name: Build Electron Desktop App + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + build: + name: Build Electron (${{ matrix.os }}) + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - os: windows + runner: windows-latest + target: win + - os: macos + runner: macos-latest + target: mac + - os: linux + runner: ubuntu-latest + target: linux + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: 22 + cache: npm + + - name: Cache node_modules + uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Install dependencies + run: npm ci + + - name: Build Next.js standalone + run: npm run build + + - name: Install Electron dependencies + working-directory: electron + run: npm ci + + - name: Build Electron for ${{ matrix.target }} + working-directory: electron + run: npm run build:${{ matrix.target }} + + - name: Upload release assets + uses: softprops/action-gh-release@v2 + with: + files: electron/dist-electron/**/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index a93fed538e..b3f77d7c15 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,4 @@ app.__qa_backup/ # Electron (subproject dependency lock) electron/package-lock.json +icon.iconset/ diff --git a/electron/assets/icon.icns b/electron/assets/icon.icns new file mode 100644 index 0000000000..4e17adafe3 Binary files /dev/null and b/electron/assets/icon.icns differ diff --git a/electron/assets/icon.ico b/electron/assets/icon.ico new file mode 100644 index 0000000000..1b6fbae4f3 Binary files /dev/null and b/electron/assets/icon.ico differ diff --git a/electron/assets/icon.png b/electron/assets/icon.png new file mode 100644 index 0000000000..4d4a0d1407 Binary files /dev/null and b/electron/assets/icon.png differ diff --git a/electron/assets/tray-icon.png b/electron/assets/tray-icon.png new file mode 100644 index 0000000000..4e4abe2b78 Binary files /dev/null and b/electron/assets/tray-icon.png differ