Skip to content

ci(release): Forge-based release + test CI#7

Merged
gocanto merged 4 commits into
mainfrom
feat/forge-release-ci
Jun 2, 2026
Merged

ci(release): Forge-based release + test CI#7
gocanto merged 4 commits into
mainfrom
feat/forge-release-ci

Conversation

@gocanto

@gocanto gocanto commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

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) — idempotent gh release view || gh release create --generate-notes --verify-tag.
  • build-macos (macos-14) — builds the Go API binary, shared TS libs, renderer + electron bundles, runs electron-forge make, canonicalizes Forge outputs to git-diff-review-<version>-arm64.{dmg,zip}, and uploads via gh release upload --clobber. Adds concurrency, permissions: contents: write, and an Electron download cache.
  • bump-cask (ubuntu, final tags only) — retained, now reads build-macos outputs.

Test CI (.github/workflows/test.yml) — new

On push/PR to main, split into test-ts (turbo, TS packages) and test-go (make test-api).

Electron Forge cutover

  • forge.config.ts (loaded via jiti): adds ignore list, ELECTRON_CACHE download root, generateAssets icon hook, and prune: false to skip Forge's 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 — mirroring how electron-builder previously shipped only dist/ + dist-electron/.
  • nodeLinker: hoisted in pnpm-workspace.yaml; fs-xattr + macos-alias added to onlyBuiltDependencies for maker-dmg.
  • Reclassify renderer-only deps (@lexical/*, @pierre/*, pinia, lexical, …) as devDependencies in ui + domain, matching how vue/reka-ui are already treated (vite bundles them).
  • Replace dist:mac:* scripts with package/make/make:mac/publish; remove electron-builder and the Go release harness (packages/tools/cmd/release-macos-unsigned, internal/release).
  • Docs/README updated for the Forge flow.

Verification (local)

  • electron-forge make:macGit Diff Review-0.1.1-arm64.dmg + .zip; .app embeds Contents/Resources/api, asar contains only dist/ + dist-electron/ + package.json (0 node_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 format clean.

Notes

  • Stays macOS arm64-only (the app embeds a darwin/arm64 Go binary), so the upstream Linux/Windows jobs are intentionally omitted.
  • Signing/notarization remain off; forge.config.ts wires osxSign/osxNotarize automatically once the Apple secrets are present.

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/ui/vite.electron.config.ts Outdated
@gocanto gocanto changed the title ci(release): replicate codiff's Forge-based release + test CI ci(release): Forge-based release + test CI Jun 2, 2026
gocanto added 3 commits June 2, 2026 13:23
…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
@gocanto gocanto merged commit 0f6f9df into main Jun 2, 2026
2 checks passed
@gocanto gocanto deleted the feat/forge-release-ci branch June 2, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant