Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ jobs:
platform: linux
target: AppImage
arch: x64
- label: Ubuntu .deb x64
runner: blacksmith-32vcpu-ubuntu-2404
platform: linux
target: deb
arch: x64
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.

Duplicate artifact name causes release workflow failure

High Severity

The new Ubuntu .deb x64 matrix entry has platform: linux and arch: x64, identical to the existing Linux x64 (AppImage) entry. The artifact upload step on line 357 derives its name from desktop-${{ matrix.platform }}-${{ matrix.arch }}, so both jobs produce desktop-linux-x64. With actions/upload-artifact@v7, the second job to finish will fail because an artifact with that name already exists and no overwrite: true is set. The artifact name needs to incorporate the target to differentiate the two Linux builds.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit fbd1741. Configure here.

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.

Linux updater metadata collision between AppImage and deb builds

Medium Severity

Both the AppImage and deb builds will generate identically-named auto-update metadata files (latest-linux.yml or nightly-linux.yml) because resolveGitHubPublishConfig injects a publish config for all targets. When artifacts are merged via download-artifact with merge-multiple: true, one metadata file silently overwrites the other. If the deb metadata wins, AppImage auto-update users get pointed to a .deb file, breaking auto-updates. The macOS builds handle a similar multi-arch collision via manifest renaming (lines 335–340), but no equivalent handling exists for the two Linux targets.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 009af84. Configure here.

- label: Windows x64
runner: blacksmith-32vcpu-windows-2025
platform: win
Expand Down Expand Up @@ -318,6 +323,7 @@ jobs:
"release/*.dmg" \
"release/*.zip" \
"release/*.AppImage" \
"release/*.deb" \
"release/*.exe" \
"release/*.blockmap" \
"release/*.yml"; do
Expand Down Expand Up @@ -485,6 +491,7 @@ jobs:
release-assets/*.dmg
release-assets/*.zip
release-assets/*.AppImage
release-assets/*.deb
release-assets/*.exe
release-assets/*.blockmap
release-assets/*.yml
Expand All @@ -505,6 +512,7 @@ jobs:
release-assets/*.dmg
release-assets/*.zip
release-assets/*.AppImage
release-assets/*.deb
release-assets/*.exe
release-assets/*.blockmap
release-assets/*.yml
Expand Down
4 changes: 3 additions & 1 deletion docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ This document covers the unified release workflow for stable and nightly desktop
- scheduled nightly at `09:00 UTC`
- manual `workflow_dispatch` for either channel
- Runs quality gates first: lint, typecheck, test.
- Builds four artifacts in parallel for both channels:
- Builds five artifacts in parallel for both channels:
- macOS `arm64` DMG
- macOS `x64` DMG
- Linux `x64` AppImage
- Ubuntu `x64` `.deb`
- Windows `x64` NSIS installer
- Publishes one GitHub Release with all produced files.
- Stable tags with a suffix after `X.Y.Z` (for example `1.2.3-alpha.1`) are published as GitHub prereleases.
Expand Down Expand Up @@ -58,6 +59,7 @@ This document covers the unified release workflow for stable and nightly desktop
- the app forwards it as an `Authorization: Bearer <token>` request header for updater HTTP calls.
- Required release assets for updater:
- platform installers (`.exe`, `.dmg`, `.AppImage`, plus macOS `.zip` for Squirrel.Mac update payloads)
- Ubuntu `.deb` packages are published for direct installation, but Linux auto-update metadata still targets the AppImage build only.
- channel metadata: `latest*.yml` for stable releases, `nightly*.yml` for nightly releases
- `*.blockmap` files (used for differential downloads)
- macOS metadata note:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"dist:desktop:dmg:arm64": "node scripts/build-desktop-artifact.ts --platform mac --target dmg --arch arm64",
"dist:desktop:dmg:x64": "node scripts/build-desktop-artifact.ts --platform mac --target dmg --arch x64",
"dist:desktop:linux": "node scripts/build-desktop-artifact.ts --platform linux --target AppImage --arch x64",
"dist:desktop:deb": "node scripts/build-desktop-artifact.ts --platform linux --target deb --arch x64",
"dist:desktop:win": "node scripts/build-desktop-artifact.ts --platform win --target nsis",
"dist:desktop:win:arm64": "node scripts/build-desktop-artifact.ts --platform win --target nsis --arch arm64",
"dist:desktop:win:x64": "node scripts/build-desktop-artifact.ts --platform win --target nsis --arch x64",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-desktop-artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* (
options.verbose,
);

// electron-builder is filtering out stageResourcesDir directory in the AppImage for production
// electron-builder filters this directory out of Linux bundles, so stage a copy that packaged builds can read.
yield* fs.copy(stageResourcesDir, path.join(stageAppDir, "apps/desktop/prod-resources"));

const stagePackageJson: StagePackageJson = {
Expand Down Expand Up @@ -896,7 +896,7 @@ const buildDesktopArtifactCli = Command.make("build-desktop-artifact", {
),
target: Flag.string("target").pipe(
Flag.withDescription(
"Artifact target, for example dmg/AppImage/nsis (env: T3CODE_DESKTOP_TARGET).",
"Artifact target, for example dmg/AppImage/deb/nsis (env: T3CODE_DESKTOP_TARGET).",
),
Flag.optional,
),
Expand Down
Loading