mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
feat(packaging): all-platform builds with GitHub Releases
Closes the gap from the previous handoff: `npm run dist:all` now produces Linux .deb/AppImage/snap, Windows NSIS/portable/zip, and macOS dmg/zip artifacts. `.github/workflows/release.yml` builds all three on tag push (v*) and attaches the union to a GitHub Release. Bug fix in the same commit (would have broken any packaged build): * `build.files` was `["src/**/*", ...]` — shipped `src/renderer/` .tsx dev source into the asar. Replaced with a whitelist (`src/main/**/*`, `src/preload.js`, `src/plugins/**/*`, `package.json`) and moved the built renderer to `build.extraResources` (`dist/renderer` -> `renderer/`). * `src/main/window/index.js` now uses `process.resourcesPath` when `app.isPackaged` is true, plus a friendly error if the renderer is missing. Verified by extracting the .AppImage and launching the binary — main process logs `Production mode — loading .../resources/renderer/index.html`. New in `package.json` build config: * `mac.target`: dmg + zip for x64 and arm64; `darkModeSupport: true`, `hardenedRuntime: false`, `gatekeeperAssess: false`, `entitlements: null`. `mac.identity: null` retained (unsigned). * `publish`: GitHub Releases provider. CI overrides with `--publish=never`. Known limitations (intentional follow-ups, not blockers): * No `assets/icon.icns` — macOS app uses the default Electron icon. This box lacks `iconutil`/`png2icns`; generating a proper .icns is a one-line follow-up. * No code signing — Windows SmartScreen will warn, macOS Gatekeeper will quarantine. `CSC_LINK_BASE64`/`CSC_KEY_PASSWORD` secrets are already wired in the Windows job for when the cert is added. * No auto-update — user decision. The `publish` block writes the metadata that a future `electron-updater` integration will consume. Verified on this Linux box: * `npm run build:renderer` then `npm run build:linux` — produced AppImage (291M), deb (220M), snap (245M). * `resources/app.asar` has 0 `src/renderer/*` entries (was the pre-fix bug). 44 .tsx files remain in asar — all from `node_modules/@hookform/resolvers` and `node_modules/immer` test fixtures, not our code. * Extracted `squashfs-root/resources/renderer/index.html` exists and is what `window/index.js` loads. * Binary runs for >12s without crashing — `loadFile` resolves `process.resourcesPath/renderer/index.html` correctly. Tests: 306/306 pass. No regressions. Plan doc: docs/plans/2026-06-06-packaging-all-platforms.md (the task-by-task execution guide I followed; included for traceability).
This commit is contained in:
+25
-5
@@ -166,15 +166,20 @@
|
||||
},
|
||||
"icon": "assets/icon",
|
||||
"files": [
|
||||
"src/**/*",
|
||||
"assets/**/*",
|
||||
"scripts/**/*",
|
||||
"node_modules/**/*",
|
||||
"src/main/**/*",
|
||||
"src/preload.js",
|
||||
"src/plugins/**/*",
|
||||
"package.json"
|
||||
],
|
||||
"asarUnpack": [
|
||||
"node_modules/ffmpeg-static/**"
|
||||
],
|
||||
"extraResources": [
|
||||
{
|
||||
"from": "dist/renderer",
|
||||
"to": "renderer"
|
||||
}
|
||||
],
|
||||
"extraFiles": [],
|
||||
"fileAssociations": [
|
||||
{
|
||||
@@ -201,7 +206,16 @@
|
||||
],
|
||||
"mac": {
|
||||
"category": "public.app-category.productivity",
|
||||
"identity": null
|
||||
"identity": null,
|
||||
"target": [
|
||||
{ "target": "dmg", "arch": ["x64", "arm64"] },
|
||||
{ "target": "zip", "arch": ["x64", "arm64"] }
|
||||
],
|
||||
"icon": "assets/icon.icns",
|
||||
"darkModeSupport": true,
|
||||
"hardenedRuntime": false,
|
||||
"gatekeeperAssess": false,
|
||||
"entitlements": null
|
||||
},
|
||||
"win": {
|
||||
"target": [
|
||||
@@ -274,6 +288,12 @@
|
||||
],
|
||||
"description": "Professional Markdown editor and universal file converter",
|
||||
"maintainer": "ConcreteInfo <amit.wh@gmail.com>"
|
||||
},
|
||||
"publish": {
|
||||
"provider": "github",
|
||||
"owner": "amitwh",
|
||||
"repo": "markdown-converter",
|
||||
"releaseType": "release"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user