diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f896a3..79a9c72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,9 +40,7 @@ jobs: ELECTRON: 'true' - name: Package desktop app - run: npx electron-builder --${{ matrix.platform }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx electron-builder --${{ matrix.platform }} --publish never - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/electron-builder.yml b/electron-builder.yml index bf0441b..fd787e8 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -8,7 +8,7 @@ files: - dist-electron/**/* extraResources: - from: config.default.json - to: ../config.json + to: config.json win: icon: build/icon.ico target: diff --git a/electron/main.ts b/electron/main.ts index b160b21..1e8c8b4 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -5,12 +5,12 @@ import fs from 'node:fs'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -// config.json lives next to the app: +// Config paths: // dev → project root (process.cwd()), falls back to config.default.json -// prod → next to the executable (shipped from config.default.json) -const appDir = app.isPackaged ? path.dirname(process.execPath) : process.cwd(); -const configPath = path.join(appDir, 'config.json'); -const defaultConfigPath = path.join(appDir, 'config.default.json'); +// prod → extraResources dir (Contents/Resources on macOS, resources/ on Linux/Windows) +const configDir = app.isPackaged ? process.resourcesPath : process.cwd(); +const configPath = path.join(configDir, 'config.json'); +const defaultConfigPath = path.join(configDir, 'config.default.json'); interface Config { host: string; diff --git a/package.json b/package.json index aa2ecfb..f60b403 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,8 @@ "name": "rowbinary-explorer", "private": true, "version": "0.0.1", + "description": "Interactive hex viewer for ClickHouse RowBinary and Native wire formats", + "author": "alex-clickhouse ", "type": "module", "main": "dist-electron/main.js", "scripts": {