diff --git a/.changeset/fix-release-binary-publish.md b/.changeset/fix-release-binary-publish.md new file mode 100644 index 0000000000..2e3953b992 --- /dev/null +++ b/.changeset/fix-release-binary-publish.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Fix release pipeline so binaries and desktop installers publish again. +category: fix +dev: github-release job sparse-checks-out CHANGELOG.md (was missing a checkout, so the release-notes step threw ENOENT and published 0 assets on v0.47.0); desktop esbuild build externalizes @fusion/engine so it no longer tries to bundle node-pty's native .node binaries. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d0007e712..7e41ab8137 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -373,6 +373,18 @@ jobs: contents: write steps: + # FNXC:Changelog 2026-06-25-09:30: + # The release-notes step reads root CHANGELOG.md, so this job needs the repo + # tree — not just downloaded artifacts. Without this checkout the notes step + # threw `ENOENT: CHANGELOG.md` and failed the whole job, publishing zero + # binaries on v0.47.0 even though every bun build leg succeeded. Sparse-checkout + # only CHANGELOG.md to keep the job lean; no submodules or full history needed. + - name: Checkout CHANGELOG for release notes + uses: actions/checkout@v4 + with: + sparse-checkout: CHANGELOG.md + sparse-checkout-cone-mode: false + - name: Download all artifacts uses: actions/download-artifact@v4 with: @@ -401,18 +413,25 @@ jobs: id: notes run: | VERSION="${GITHUB_REF#refs/tags/v}" + # FNXC:Changelog 2026-06-25-09:30: + # Never let release-note extraction fail the publish. A missing/unreadable + # CHANGELOG or absent version section falls back to a plain "Release vX.Y.Z" + # body so binaries still ship — matching the job's "partial over none" intent. NOTES=$(node -e " const fs = require('fs'); - const content = fs.readFileSync('CHANGELOG.md', 'utf8'); + const fallback = 'Release v${VERSION}'; + let content = ''; + try { content = fs.readFileSync('CHANGELOG.md', 'utf8'); } + catch (e) { console.log(fallback); process.exit(0); } const lines = content.split(/\r?\n/); const header = '## ' + '${VERSION}'; const start = lines.findIndex(l => l.trim() === header); - if (start === -1) { console.log('Release v${VERSION}'); process.exit(0); } + if (start === -1) { console.log(fallback); process.exit(0); } let end = lines.length; for (let i = start + 1; i < lines.length; i++) { if (lines[i].startsWith('## ')) { end = i; break; } } - console.log(lines.slice(start + 1, end).join('\n').trim() || 'Release v${VERSION}'); + console.log(lines.slice(start + 1, end).join('\n').trim() || fallback); ") echo "$NOTES" > /tmp/release-notes.md diff --git a/packages/desktop/scripts/build.ts b/packages/desktop/scripts/build.ts index 728b875ac0..7c4fb4b453 100644 --- a/packages/desktop/scripts/build.ts +++ b/packages/desktop/scripts/build.ts @@ -5,10 +5,18 @@ import { buildDashboardClient, packageRoot, workspaceRoot } from "./workspace-to const dashboardClientDir = join(workspaceRoot, "packages", "dashboard", "dist", "client"); const desktopDistDir = join(packageRoot, "dist"); const desktopClientDistDir = join(desktopDistDir, "client"); +// FNXC:DesktopBuild 2026-06-25-09:45: +// Every workspace @fusion/* package and native (.node) module must stay external +// to the Electron main/preload bundles — they resolve from node_modules at runtime. +// @fusion/engine was missing here, so esbuild followed local-runtime.ts's dynamic +// `import("@fusion/engine")` and tried to bundle engine's transitive node-pty +// (@homebridge/node-pty-prebuilt-multiarch) native binaries, failing with +// "No loader is configured for .node files" and breaking every desktop release build. const sharedExternals = [ "electron", "@fusion/core", "@fusion/dashboard", + "@fusion/engine", "better-sqlite3", ]; const mainExternals = sharedExternals;