ci(release): Forge-based release + test CI#7
Conversation
Cut over packaging from electron-builder to Electron Forge and restructure
the release workflow into nkzw-tech/codiff's shape, plus add the missing
test CI.
Release (.github/workflows/release.yml):
- Idempotent `create-release` job fans out to a `build-macos` job that runs
`electron-forge make`, canonicalizes the Forge outputs to
git-diff-review-<version>-arm64.{dmg,zip}, and uploads via
`gh release upload --clobber`. Adds concurrency + Electron download cache.
- `bump-cask` retained (now keyed off build-macos outputs).
Test CI (.github/workflows/test.yml): new workflow on push/PR to main with
split test-ts (turbo, TS packages) and test-go (`make test-api`) jobs.
Forge cutover:
- forge.config.ts loaded via jiti; adds ignore list, ELECTRON_CACHE root,
generateAssets icon hook, and prune:false so it skips the dependency
walker (incompatible with pnpm's workspace layout).
- Bundle the Electron main process (vite, ESM) alongside preload so the
packaged app is self-contained and ships no node_modules.
- nodeLinker: hoisted (pnpm-workspace.yaml); build fs-xattr + macos-alias
for maker-dmg.
- Reclassify renderer-only deps (lexical/pierre/pinia/…) as devDependencies
in ui + domain, matching how vue/reka-ui are already treated.
- Replace dist:mac:* scripts with package/make/make:mac/publish; drop
electron-builder and the Go release harness (workflow is the release path).
Docs/README updated to describe the Forge flow.
There was a problem hiding this comment.
Code Review
This pull request migrates the macOS app packaging and distribution workflow from electron-builder to Electron Forge. It removes the legacy Go-based release tool and electron-builder configurations, updates package scripts, adds Electron Forge dependencies, and configures forge.config.ts. Additionally, the Electron build in vite.electron.config.ts is split into sequential builds for main and preload targets, and the workspace is configured to use a hoisted node linker. Feedback on the changes suggests dynamically setting emptyOutDir in the Vite configuration to clean the output directory at the start of the build process without wiping out subsequent build outputs.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…emptyOutDir - Remove codiff/nkzw-tech references from release/test workflows, docs, and a regression-test comment - Extract the artifact-collection step into packages/ui/scripts/collect-release-artifacts.sh - vite.electron.config: clean dist-electron only on the main build so the preload output is preserved (PR review) - docs: tap oullin/homebrew-tap now exists; note HOMEBREW_TAP_TOKEN setup
# Conflicts: # packages/ui/src/App.vue
Replicates a Forge-based release process and CI, adapted to this hybrid Electron + Go monorepo.
What changed
Release workflow (
.github/workflows/release.yml)Restructured on
v*tags:create-release(ubuntu) — idempotentgh release view || gh release create --generate-notes --verify-tag.build-macos(macos-14) — builds the Go API binary, shared TS libs, renderer + electron bundles, runselectron-forge make, canonicalizes Forge outputs togit-diff-review-<version>-arm64.{dmg,zip}, and uploads viagh release upload --clobber. Addsconcurrency,permissions: contents: write, and an Electron download cache.bump-cask(ubuntu, final tags only) — retained, now readsbuild-macosoutputs.Test CI (
.github/workflows/test.yml) — newOn push/PR to
main, split intotest-ts(turbo, TS packages) andtest-go(make test-api).Electron Forge cutover
forge.config.ts(loaded via jiti): addsignorelist,ELECTRON_CACHEdownload root,generateAssetsicon hook, andprune: falseto skip Forge's dependency walker (incompatible with pnpm's workspace layout).node_modules— mirroring how electron-builder previously shipped onlydist/+dist-electron/.nodeLinker: hoistedinpnpm-workspace.yaml;fs-xattr+macos-aliasadded toonlyBuiltDependenciesformaker-dmg.@lexical/*,@pierre/*,pinia,lexical, …) asdevDependenciesinui+domain, matching howvue/reka-uiare already treated (vite bundles them).dist:mac:*scripts withpackage/make/make:mac/publish; removeelectron-builderand the Go release harness (packages/tools/cmd/release-macos-unsigned,internal/release).Verification (local)
electron-forge make:mac→Git Diff Review-0.1.1-arm64.dmg+.zip;.appembedsContents/Resources/api, asar contains onlydist/+dist-electron/+package.json(0node_modules), app launches without crashing.turbo run test --filter=ui --filter=@git-diff/bridge --filter=@git-diff/domain→ 141 tests pass.make test-api→ green.make formatclean.Notes
forge.config.tswiresosxSign/osxNotarizeautomatically once the Apple secrets are present.