Auto-update broken: electron-updater .yml manifests reference unprefixed filenames, but CI attaches assets with a date/commit prefix #8

Open
opened 2026-07-14 18:07:05 +00:00 by mohlec · 0 comments
Owner

Problem

electron-builder emits per-platform auto-update manifests (latest-linux.yml, latest-mac.yml, latest.yml) on every build. The app's electron-builder.ts publish block points the in-app updater (electron-updater) at the rolling desktop-latest release:

publish:
  provider: 'generic'
  url: 'https://git.ncwcom.com/slash/slash-desktop/releases/download/desktop-latest'

The manifests reference the plain installer filenames, e.g.:

path: slash-desktop-6.2.2-mac-arm64.zip
files:
  - url: slash-desktop-6.2.2-mac-arm64.zip
    sha512: ...

But the CI Save artifacts steps rename every asset with a slash-desktop-{date}-{commit}- prefix before attaching it (e.g. slash-desktop-20260714-0da9ff67-slash-desktop-6.2.2-mac-arm64.zip). So electron-updater would fetch the .yml, then request the unprefixed filename from the release download URL and get a 404. In-app auto-update does not work as currently shipped.

Interim action taken

The .yml manifests have been removed from the release entirely (CI no longer attaches them; the three stale ones on desktop-latest were deleted manually), since they only cause confusion while pointing at files that can't be found. Manual download/install is unaffected.

To actually fix (pick one)

  1. Stop renaming assets — drop the {date}-{commit}- prefix in the Save artifacts steps so the attached filenames match what the manifests expect, and re-include the .yml files. Simplest; loses the at-a-glance commit/date in the asset name (still available in the release body).
  2. Rewrite the .yml manifests post-build to point at the prefixed names before attaching them. Keeps the descriptive filenames but adds a manifest-rewriting step per platform.
  3. Publish to a per-commit tag instead of a rolling desktop-latest, letting electron-builder's own --publish handle upload so names and manifests stay internally consistent. Biggest change; most 'correct' long-term.

Until one of these is done, .yml files should stay out of the release (see the CI change that accompanies this issue).

## Problem electron-builder emits per-platform auto-update manifests (`latest-linux.yml`, `latest-mac.yml`, `latest.yml`) on every build. The app's `electron-builder.ts` `publish` block points the in-app updater (electron-updater) at the rolling `desktop-latest` release: ```yaml publish: provider: 'generic' url: 'https://git.ncwcom.com/slash/slash-desktop/releases/download/desktop-latest' ``` The manifests reference the **plain** installer filenames, e.g.: ```yaml path: slash-desktop-6.2.2-mac-arm64.zip files: - url: slash-desktop-6.2.2-mac-arm64.zip sha512: ... ``` But the CI `Save artifacts` steps rename every asset with a `slash-desktop-{date}-{commit}-` prefix before attaching it (e.g. `slash-desktop-20260714-0da9ff67-slash-desktop-6.2.2-mac-arm64.zip`). So electron-updater would fetch the `.yml`, then request the unprefixed filename from the release download URL and get a 404. **In-app auto-update does not work as currently shipped.** ## Interim action taken The `.yml` manifests have been removed from the release entirely (CI no longer attaches them; the three stale ones on `desktop-latest` were deleted manually), since they only cause confusion while pointing at files that can't be found. Manual download/install is unaffected. ## To actually fix (pick one) 1. **Stop renaming assets** — drop the `{date}-{commit}-` prefix in the `Save artifacts` steps so the attached filenames match what the manifests expect, and re-include the `.yml` files. Simplest; loses the at-a-glance commit/date in the asset name (still available in the release body). 2. **Rewrite the `.yml` manifests** post-build to point at the prefixed names before attaching them. Keeps the descriptive filenames but adds a manifest-rewriting step per platform. 3. **Publish to a per-commit tag** instead of a rolling `desktop-latest`, letting electron-builder's own `--publish` handle upload so names and manifests stay internally consistent. Biggest change; most 'correct' long-term. Until one of these is done, `.yml` files should stay out of the release (see the CI change that accompanies this issue).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
slash/slash-desktop#8
No description provided.