·5 min read
A 72 MB upload kept dying, so I moved releases off my laptop
A release that half exists is worse than no release. DailyBrief updates itself from GitHub releases, so every published tag is a promise to every installed copy. In August I made that promise twice and did not keep it: two tags ended up created with no files attached, because the 72 MB installer upload from my machine died partway through.
Every installed copy saw the result as a 404.
- Project
- DailyBrief
- Date
- Aug 2026
- Stack
- GitHub Actions, electron-builder, electron-updater, Node
- Commit
- 269a4d7
What broke
The release command in package.json is electron-builder --win --publish always. It builds the installer, creates the GitHub release and uploads the files to it. On my machine, the last step was the weak one. The commit message describes it in numbers: pushing the 72 MB installer up a home uplink took about fourteen minutes when it worked, and ended in ECONNRESET when it did not.
The order of operations is what made a failure expensive. The release is created before the upload starts. When the connection reset mid-upload, the release already existed, and it was a published one, since commit 312be07 (Aug 2026) had switched publishing to direct instead of drafts, because the updater only sees published releases. A tag with no assets is visible and empty.
What an installed copy does with that is the real damage. electron-updater asks the latest release for a file called latest.yml. With no assets there is no such file, and the request comes back as a 404. The updater then reports a broken release instead of no release.
What the code showed
The header of scripts/publish-assets.js states the cause. It says electron-builder's own publish step keeps dying on the 72 MB upload with ECONNRESET after it has already created the release. That one sentence is the whole bug: the failure was not in the build and not in the release logic. It was the distance between my laptop and GitHub, and the order of steps made that distance fatal.
No code change fixes a slow uplink. What I could change was where the upload happened. A runner on GitHub's own infrastructure is already inside their network, so the same upload becomes a local one.
The fix
Commit 269a4d7 (Aug 2026) added .github/workflows/release.yml. Pushing a tag that starts with v starts a job on a Windows runner:
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Existing tag to build and publish (e.g. v1.7.2)'
required: trueThe steps check out the tag, install with npm ci, run npm test, and only then call npx electron-builder --win --publish always. A comment sits on the test step, because it is a decision and not an accident: a release that fails its own tests is not worth uploading. The workflow_dispatch trigger runs the same job by hand for a tag that already exists, which covers a repaired or repeated release.
- 01
Push v tag
git tag v1.7.2 and git push origin v1.7.2
- 02
Build on a runner
Windows, Node 22, npm ci
- 03
Run the tests
a failing release is not uploaded
- 04
Publish
electron-builder uploads from inside GitHub's network
The old path did not disappear. scripts/publish-assets.js stayed as a manual fallback, and it encodes what I learned about the updater. It computes the sha512 of the installer as base64, not hex, because that is the format the updater compares against. It writes latest.yml itself. It creates the release only if it is missing. It uploads the installer first and the manifest last, because a latest.yml that points at an asset that is not there yet is exactly the 404 the script exists to fix. And each upload gets up to five attempts with --clobber, so a half-published release can be repaired without a full rebuild.
What I would do differently
I would have moved to CI after the first tag that came out empty, not the second. That first dead tag was already the answer. I kept treating the uplink as a thing to retry through, when the real problem was that a release depended on a connection I do not control.
I would also publish in the opposite order. Create the release last, after every asset exists, so that a failed upload leaves nothing visible. Draft releases were meant to give me that, and the updater's rule that it only sees published releases is why I turned them off. A workflow that creates the release and the files in one job gets close, but only because the upload became reliable, not because the order became safe.
And I would add a check at the end of the workflow that fetches latest.yml from the new release and fails the job if it is missing. The updater sees that file first, so the pipeline should look at it too.
Where this fits
Release plumbing is rarely the interesting part of a project, but an auto-updating desktop app lives or dies on it. The full DailyBrief case study covers the rest of that path, from version tags to the update check every six hours, along with the pipeline the releases carry.
See what DailyBrief actually does with the releases it ships, from the digest to the board.
Read the full case study#github-actions#electron#ci#auto-update
Keep reading
Have a project in mind?