Skip to content

fix(desktop): enable Tauri bundling for desktop release - #11

Merged
AruNi-01 merged 6 commits into
mainfrom
codex/fix-desktop-application-publishing-error
Mar 3, 2026
Merged

AruNi-01 merged 6 commits into
mainfrom
codex/fix-desktop-application-publishing-error

Conversation

@AruNi-01

@AruNi-01 AruNi-01 commented Mar 3, 2026 •

Copy link
Copy Markdown
Owner

Motivation

  • The desktop release workflow completed the build but reported No artifacts were found because Tauri bundling was disabled in production config.
  • Enable bundling so the CI can produce and upload the expected package artifacts (.dmg, .app, tarball/signature) used by tauri-action.

Description

  • Set "bundle.active" to true in apps/desktop/src-tauri/tauri.conf.json to enable packaging during the Tauri build step.
  • Left existing externalBin and resources configuration intact so the sidecar binary and web output continue to be included in the bundle.

Testing

  • Validated the updated JSON with jq . apps/desktop/src-tauri/tauri.conf.json which returned successfully.
  • This change addresses the artifact discovery failure in the existing release-desktop.yml CI job by allowing Tauri to produce bundle artifacts for upload.

Codex Task


Summary by cubic

Enable Tauri bundling so desktop releases produce installers (.dmg/.app and tar/signature). Replace the bash prebuild with a cross‑platform Node script that builds the sidecar and web assets; CI validates on PRs and manual runs, and only publishes on tag pushes.

  • Refactors
    • Run PR and workflow_dispatch builds with --no-bundle; gate release to tag refs.
    • Support Desktop tag variants (desktop-v*/DeskTop-v*/Desktop-v*); use ref name for tag.
    • Use before-build Node script (before-build.mjs) to compile the sidecar for the host target and copy web static output.

Written for commit 25b305d. Summary will update on new commits.

Summary by CodeRabbit

  • Chores
    • Enabled bundling for the desktop app to improve packaging and distribution.
    • Replaced the pre-build hook with a Node-based pre-build script that runs web and native builds and packages sidecar binaries.
    • Improved release automation: added additional tag patterns, extended CI triggers to desktop paths and pull requests, added a PR/manual validation build step, and switched to dynamic tag naming.

@vercel

vercel Bot commented Mar 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
atmos-landing Ready Ready Preview, Comment Mar 3, 2026 3:30pm

@coderabbitai

coderabbitai Bot commented Mar 3, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5870a3 and 25b305d.

📒 Files selected for processing (1)
  • .github/workflows/release-desktop.yml

📝 Walkthrough

Walkthrough

Switched Tauri pre-build from a shell pipeline to a Node script that builds web and API sidecar artifacts, enabled Tauri bundling, and expanded CI release workflow triggers and PR-validation build steps.

Changes

Cohort / File(s) Summary
Tauri Configs
apps/desktop/src-tauri/tauri.conf.json, apps/desktop/src-tauri/tauri.debug.conf.json
Replaced shell beforeBuildCommand with node ./scripts/before-build.mjs. Enabled bundle.active in tauri.conf.json.
Build orchestration script
apps/desktop/scripts/before-build.mjs
Added Node script that runs Bun web build (BUILD_TARGET=desktop), detects Rust target triple (env or rustc -vV), builds API via cargo build --release --target, copies API binary (adds .exe on Windows) into sidecar binaries, and optionally copies web output; includes error handling and warnings.
Package script
apps/desktop/package.json
Updated prepare-sidecar invocation to node ./scripts/before-build.mjs (replaces Bash script).
CI / Release Workflow
.github/workflows/release-desktop.yml
Expanded push tag patterns (DeskTop-v*, Desktop-v*), added apps/desktop/** to PR triggers, added PR/manual validation step to build the Tauri app, and switched release tagName to use github.ref_name dynamically.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Actions
    participant Bun as Bun (web build)
    participant Rust as rustc/cargo
    participant FS as Filesystem

    Dev->>GH: push PR / tag / manual dispatch
    GH->>GH: choose workflow (PR validation or release)
    GH->>Bun: invoke `node ./scripts/before-build.mjs` -> run `BUILD_TARGET=desktop bun --filter web build`
    Bun-->>GH: produce web output (apps/web/out)
    GH->>Rust: probe `rustc -vV` or read $TARGET_TRIPLE
    Rust-->>GH: return host target triple
    GH->>Rust: run `cargo build --release --target {triple}`
    Rust-->>GH: produce API binary (target/{triple}/release/api[.exe])
    GH->>FS: create sidecar dir, copy `api-{triple}[.exe]` and optionally `web-out`
    FS-->>GH: sidecar artifacts ready for packaging/publishing
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I swapped my bash for node tonight,
Built web and API by soft moonlight,
Copied sidecars, named them neat,
Tags now fly—release feels sweet. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(desktop): enable Tauri bundling for desktop release' directly and clearly identifies the main change: enabling Tauri bundling in the production configuration to fix the artifact generation issue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/fix-desktop-application-publishing-error

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 1 file

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/release-desktop.yml">

<violation number="1" location=".github/workflows/release-desktop.yml:67">
P2: Release name will be redundant: `Atmos Desktop desktop-v1.0.0`. The `${{ github.ref_name }}` includes the full tag (e.g. `desktop-v1.0.0`), so the word "desktop" appears twice. The previous `Atmos Desktop v__VERSION__` was correct — tauri-action's `__VERSION__` placeholder is replaced with the version from `tauri.conf.json`, producing a clean name like `Atmos Desktop v1.0.0`. Consider keeping `__VERSION__` for `releaseName` while using `${{ github.ref_name }}` for `tagName` if needed.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread .github/workflows/release-desktop.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/release-desktop.yml (1)

7-8: Consider using a single, consistent tag pattern.

Having three case variants (desktop-v*, DeskTop-v*, Desktop-v*) may indicate inconsistent tagging practices. A simpler approach would be to standardize on one pattern (e.g., desktop-v*) and enforce it via documentation or branch protection rules.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-desktop.yml around lines 7 - 8, Standardize the
release tag pattern by removing the mixed-case variants and keeping a single
consistent pattern (e.g., replace "DeskTop-v*" and "Desktop-v*" with just
"desktop-v*"); update any places in the workflow where those three entries
appear so only the chosen pattern ("desktop-v*") remains and adjust any docs or
branch rules that reference the other variants to use the single pattern.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release-desktop.yml:
- Around line 9-13: The workflow currently adds workflow_dispatch but the
PR-only and tag-only conditions (checks referencing github.event_name ==
'pull_request' and startsWith(github.ref, 'refs/tags/')) prevent any
build/release steps from running on manual dispatch; either remove
workflow_dispatch if manual runs are not desired, or update the step/job
conditions (e.g., in the release and PR validation jobs/steps that reference
github.event_name and github.ref) to include a branch for manual runs (check for
github.event_name == 'workflow_dispatch' or a specific input like
github.event.inputs.publish == 'true') so that the intended build/release jobs
(the sidecar build and release steps) run when workflow_dispatch is used.

---

Nitpick comments:
In @.github/workflows/release-desktop.yml:
- Around line 7-8: Standardize the release tag pattern by removing the
mixed-case variants and keeping a single consistent pattern (e.g., replace
"DeskTop-v*" and "Desktop-v*" with just "desktop-v*"); update any places in the
workflow where those three entries appear so only the chosen pattern
("desktop-v*") remains and adjust any docs or branch rules that reference the
other variants to use the single pattern.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7dab43 and e839e16.

📒 Files selected for processing (1)
  • .github/workflows/release-desktop.yml

Comment thread .github/workflows/release-desktop.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/desktop/src-tauri/tauri.debug.conf.json (1)

9-9: Consider using the package script to avoid command duplication.

Using npm run prepare:sidecar here keeps one canonical command path (package.json) and reduces drift between configs.

Proposed tweak
-    "beforeBuildCommand": "node ./scripts/before-build.mjs",
+    "beforeBuildCommand": "npm run prepare:sidecar",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/desktop/src-tauri/tauri.debug.conf.json` at line 9, Replace the
hard-coded beforeBuildCommand value ("node ./scripts/before-build.mjs") with the
package script invocation ("npm run prepare:sidecar") so the tauri debug config
uses the canonical script in package.json; update the "beforeBuildCommand" entry
to call the package script instead of directly running the node script to avoid
duplication and drift.
apps/desktop/scripts/before-build.mjs (1)

66-72: Fail fast in CI when apps/web/out is missing.

After running the web build, only warning on missing output can let CI produce incomplete desktop artifacts.

Proposed CI-safe guard
 if (existsSync(webOut)) {
   rmSync(sidecarWebOut, { recursive: true, force: true });
   cpSync(webOut, sidecarWebOut, { recursive: true });
   console.log(`Copied web static export to: ${sidecarWebOut}`);
 } else {
-  console.warn(`Warning: ${webOut} not found, skipping web static copy`);
+  const msg = `Warning: ${webOut} not found, skipping web static copy`;
+  if (process.env.CI === "true") {
+    console.error(msg);
+    process.exit(1);
+  }
+  console.warn(msg);
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/desktop/scripts/before-build.mjs` around lines 66 - 72, Replace the
current warning path for missing webOut so CI fails fast: in the block that
checks existsSync(webOut) (using webOut and sidecarWebOut with rmSync/cpSync),
when webOut is missing, call console.error with a clear message and exit with a
non-zero code (e.g., process.exit(1)); optionally, to preserve local dev UX,
only exit in CI by checking process.env.CI (if true exit, otherwise keep the
console.warn).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/desktop/scripts/before-build.mjs`:
- Line 5: The script uses import.meta.dirname to compute rootDir which fails on
Node < v20.11; update the rootDir calculation in before-build.mjs to safely fall
back when import.meta.dirname is unavailable by detecting its presence and
otherwise computing dirname from fileURLToPath(import.meta.url) (using
url.fileURLToPath and path.dirname) before calling resolve; reference the
rootDir variable and import.meta.dirname and ensure any required imports (path
and url/fileURLToPath) are added so the script works across older Node runtimes
invoked by Tauri's beforeBuildCommand.

---

Nitpick comments:
In `@apps/desktop/scripts/before-build.mjs`:
- Around line 66-72: Replace the current warning path for missing webOut so CI
fails fast: in the block that checks existsSync(webOut) (using webOut and
sidecarWebOut with rmSync/cpSync), when webOut is missing, call console.error
with a clear message and exit with a non-zero code (e.g., process.exit(1));
optionally, to preserve local dev UX, only exit in CI by checking process.env.CI
(if true exit, otherwise keep the console.warn).

In `@apps/desktop/src-tauri/tauri.debug.conf.json`:
- Line 9: Replace the hard-coded beforeBuildCommand value ("node
./scripts/before-build.mjs") with the package script invocation ("npm run
prepare:sidecar") so the tauri debug config uses the canonical script in
package.json; update the "beforeBuildCommand" entry to call the package script
instead of directly running the node script to avoid duplication and drift.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e839e16 and 68b72aa.

📒 Files selected for processing (4)
  • apps/desktop/package.json
  • apps/desktop/scripts/before-build.mjs
  • apps/desktop/src-tauri/tauri.conf.json
  • apps/desktop/src-tauri/tauri.debug.conf.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/desktop/src-tauri/tauri.conf.json

import { join, resolve } from "node:path";
import { spawnSync } from "node:child_process";

const rootDir = resolve(import.meta.dirname, "../../..");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify Node version expectations vs usage of import.meta.dirname
set -euo pipefail

echo "== package.json engines (all package.json files) =="
fd -a package.json -E node_modules -E dist -E build | while read -r f; do
  echo "--- $f"
  jq -r '.engines // {}' "$f"
done

echo
echo "== CI/workflow Node version pins =="
rg -n --glob '.github/workflows/**' 'setup-node|node-version|actions/setup-node'

echo
echo "== import.meta.dirname usage =="
rg -n 'import\.meta\.dirname'

Repository: AruNi-01/atmos

Length of output: 766


🌐 Web query:

Node.js import.meta.dirname availability version support when was it added

💡 Result:

import.meta.dirname (and import.meta.filename) support in Node.js:

  • Added: Node.js v20.11.0 (and also in the v21 line starting at v21.2.0). It’s available only in ES modules and only for file: modules. [1][2]
  • Status: Initially shipped as Stability: 1.2 (release candidate). [1]
  • Became non-experimental: Node.js v22.16.0 and v24.0.0. [2]

Sources: Node.js ESM docs (v20.18.0 / v20.19.0) and “latest” ESM docs showing the full version history. [1][2]


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Check if file exists and read its content =="
if [ -f "apps/desktop/scripts/before-build.mjs" ]; then
  echo "File exists. Content:"
  cat -n "apps/desktop/scripts/before-build.mjs"
else
  echo "File not found"
fi

echo
echo "== Find CI/workflow files =="
find .github -type f -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -20

echo
echo "== Check Node version in workflow files =="
find .github -type f \( -name "*.yml" -o -name "*.yaml" \) -exec grep -l "node-version\|setup-node" {} \; 2>/dev/null | while read f; do
  echo "--- $f"
  grep -n "node-version\|setup-node" "$f"
done

Repository: AruNi-01/atmos

Length of output: 2978


🌐 Web query:

Node.js v18 v19 support lifecycle when does it end deprecate

💡 Result:

  • Node.js 18 (Hydrogen, LTS): End-of-Life (no more security fixes) on April 30, 2025—so it’s already deprecated/EOL as of March 3, 2026. Node release posts for v18 reiterate this date and recommend upgrading to newer LTS lines. [1]
  • Node.js 19 (non‑LTS “Current” line): End-of-Life on April 10, 2023—also long EOL/deprecated. [2]

If you need a supported version today (March 2026), Node’s release list shows v24 as Active LTS and v22/v20 as Maintenance LTS (with v20 nearing its end). [2]

Sources
[1] Node.js v18.20.8 release post (EOL date) — nodejs.org [1]
[2] Node.js Releases table (status incl. v18/v19; current supported lines) — nodejs.org [2]


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Look for Node version management files =="
find . -maxdepth 2 -type f \( -name ".nvmrc" -o -name ".node-version" -o -name ".tool-versions" \) 2>/dev/null

echo
echo "== Check Tauri config (desktop app) =="
if [ -f "apps/desktop/src-tauri/tauri.conf.json" ]; then
  echo "Found tauri.conf.json, checking for Node requirements"
  cat "apps/desktop/src-tauri/tauri.conf.json" | head -50
fi

echo
echo "== Read CI workflow files for Node version =="
for f in .github/workflows/*.yml; do
  echo "--- $f"
  cat "$f" | grep -A 2 -B 2 "node\|Node" | head -20
done

Repository: AruNi-01/atmos

Length of output: 1363


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Read release-desktop.yml for Node version =="
head -100 ".github/workflows/release-desktop.yml" | grep -A 5 -B 5 "node\|Node\|setup"

echo
echo "== Check entire release-desktop.yml for version info =="
cat ".github/workflows/release-desktop.yml" | grep -i "node-version\|uses:.*node"

Repository: AruNi-01/atmos

Length of output: 449


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Check what Node version is bundled with Bun =="
cat ".github/workflows/release-desktop.yml"

echo
echo "== Check if there are any .github/actions files with Node setup =="
cat ".github/actions/setup-bun/action.yml"

Repository: AruNi-01/atmos

Length of output: 3196


Guard import.meta.dirname for Node runtime compatibility.

Line 5 uses import.meta.dirname, which is not available in Node.js versions before v20.11.0. Since the project does not specify a minimum Node version in its configuration and this script is invoked by Tauri's beforeBuildCommand with the system node binary, developers with older Node installations will encounter build failures before packaging starts.

Proposed compatibility fix
 import { cpSync, existsSync, mkdirSync, rmSync } from "node:fs";
-import { join, resolve } from "node:path";
+import { dirname, join, resolve } from "node:path";
 import { spawnSync } from "node:child_process";
+import { fileURLToPath } from "node:url";
 
-const rootDir = resolve(import.meta.dirname, "../../..");
+const moduleDir =
+  typeof import.meta.dirname === "string"
+    ? import.meta.dirname
+    : dirname(fileURLToPath(import.meta.url));
+const rootDir = resolve(moduleDir, "../../..");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const rootDir = resolve(import.meta.dirname, "../../..");
import { cpSync, existsSync, mkdirSync, rmSync } from "node:fs";
import { dirname, join, resolve } from "node:path";
import { spawnSync } from "node:child_process";
import { fileURLToPath } from "node:url";
const moduleDir =
typeof import.meta.dirname === "string"
? import.meta.dirname
: dirname(fileURLToPath(import.meta.url));
const rootDir = resolve(moduleDir, "../../..");
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/desktop/scripts/before-build.mjs` at line 5, The script uses
import.meta.dirname to compute rootDir which fails on Node < v20.11; update the
rootDir calculation in before-build.mjs to safely fall back when
import.meta.dirname is unavailable by detecting its presence and otherwise
computing dirname from fileURLToPath(import.meta.url) (using url.fileURLToPath
and path.dirname) before calling resolve; reference the rootDir variable and
import.meta.dirname and ensure any required imports (path and url/fileURLToPath)
are added so the script works across older Node runtimes invoked by Tauri's
beforeBuildCommand.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

3 issues found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/scripts/before-build.mjs">

<violation number="1" location="apps/desktop/scripts/before-build.mjs:16">
P2: Missing `result.error` check: if `spawnSync` fails to launch the process (e.g., command not on `PATH`), `result.status` is `null` and `result.error` holds the reason, but `stdio: "inherit"` won't surface it. The script will silently `process.exit(1)` with no diagnostic output, making CI failures hard to debug. Check `result.error` and log it before exiting.</violation>
</file>

<file name=".github/workflows/release-desktop.yml">

<violation number="1" location=".github/workflows/release-desktop.yml:13">
P1: `workflow_dispatch` from a branch skips both build steps. Neither the PR validation condition (`github.event_name == 'pull_request'`) nor the release condition (`startsWith(github.ref, 'refs/tags/')`) matches a manual dispatch from a branch. The workflow will burn CI minutes on setup without executing any Tauri build. Either add a third step for `workflow_dispatch` (e.g., a `--no-bundle` validation build), or adjust the PR validation condition to also cover manual dispatches.</violation>

<violation number="2" location=".github/workflows/release-desktop.yml:77">
P2: Release name will include the full tag prefix, producing awkward names like `Atmos Desktop desktop-v1.0.0` instead of the previous `Atmos Desktop v1.0.0`. Consider stripping the prefix or continuing to use the `__VERSION__` placeholder that `tauri-action` supports.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread .github/workflows/release-desktop.yml
...options,
});

if (result.status !== 0) {

@cubic-dev-ai cubic-dev-ai Bot Mar 3, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Missing result.error check: if spawnSync fails to launch the process (e.g., command not on PATH), result.status is null and result.error holds the reason, but stdio: "inherit" won't surface it. The script will silently process.exit(1) with no diagnostic output, making CI failures hard to debug. Check result.error and log it before exiting.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/scripts/before-build.mjs, line 16:

<comment>Missing `result.error` check: if `spawnSync` fails to launch the process (e.g., command not on `PATH`), `result.status` is `null` and `result.error` holds the reason, but `stdio: "inherit"` won't surface it. The script will silently `process.exit(1)` with no diagnostic output, making CI failures hard to debug. Check `result.error` and log it before exiting.</comment>

<file context>
@@ -0,0 +1,72 @@
+    ...options,
+  });
+
+  if (result.status !== 0) {
+    process.exit(result.status ?? 1);
+  }
</file context>
Fix with Cubic

Comment thread .github/workflows/release-desktop.yml Outdated
AruNi-01 and others added 2 commits March 3, 2026 23:25
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
When workflow_dispatch was triggered from a branch, neither the
pull_request nor the tags condition matched, so the workflow would
run all setup steps but skip both Tauri build steps entirely.

Extend the PR validation condition to also cover workflow_dispatch
so manual dispatches run a --no-bundle validation build.
@vercel

vercel Bot commented Mar 3, 2026

Copy link
Copy Markdown

Someone is attempting to deploy this pull request to the AarynLu's projects Team on Vercel.

No GitHub account was found matching the commit author email address.

To deploy this pull request, the commit author's email address needs to be associated with a GitHub account.

Learn more about how to change the commit author information.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/release-desktop.yml">

<violation number="1" location=".github/workflows/release-desktop.yml:64">
P2: When `workflow_dispatch` is triggered from a tag ref, both this `--no-bundle` validation step and the release step below will execute, because `github.event_name == 'workflow_dispatch'` is true here AND `startsWith(github.ref, 'refs/tags/')` is true for the release step. This results in a redundant no-bundle build before the actual release build. Add a guard to skip this step when running on a tag.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

mkdir -p apps/desktop/src-tauri/binaries
cp target/${{ matrix.target }}/release/api${EXT} apps/desktop/src-tauri/binaries/api-${{ matrix.target }}${EXT}
- name: Build Tauri app (PR / manual validation)
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'

@cubic-dev-ai cubic-dev-ai Bot Mar 3, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: When workflow_dispatch is triggered from a tag ref, both this --no-bundle validation step and the release step below will execute, because github.event_name == 'workflow_dispatch' is true here AND startsWith(github.ref, 'refs/tags/') is true for the release step. This results in a redundant no-bundle build before the actual release build. Add a guard to skip this step when running on a tag.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release-desktop.yml, line 64:

<comment>When `workflow_dispatch` is triggered from a tag ref, both this `--no-bundle` validation step and the release step below will execute, because `github.event_name == 'workflow_dispatch'` is true here AND `startsWith(github.ref, 'refs/tags/')` is true for the release step. This results in a redundant no-bundle build before the actual release build. Add a guard to skip this step when running on a tag.</comment>

<file context>
@@ -60,8 +60,8 @@ jobs:
-      - name: Build Tauri app (PR validation)
-        if: github.event_name == 'pull_request'
+      - name: Build Tauri app (PR / manual validation)
+        if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
         working-directory: apps/desktop
         run: bun tauri build ${{ matrix.args }} --no-bundle
</file context>
Suggested change
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
if: (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch') && !startsWith(github.ref, 'refs/tags/')
Fix with Cubic

@AruNi-01
AruNi-01 merged commit 041904c into main Mar 3, 2026
5 of 7 checks passed
AruNi-01 added a commit that referenced this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant