Skip to content

In-app auto-update from GitHub Releases (Velopack)#4

Merged
dvdstelt merged 1 commit into
mainfrom
feature/auto-update
Jul 15, 2026
Merged

In-app auto-update from GitHub Releases (Velopack)#4
dvdstelt merged 1 commit into
mainfrom
feature/auto-update

Conversation

@dvdstelt

Copy link
Copy Markdown
Owner

Summary

Adds opt-in in-app auto-update. The app checks GitHub Releases on startup and every six hours; when a newer stable release is found it shows a bold "Restart to update to vX.Y.Z" item at the top of the tray menu plus a balloon. Nothing installs until you click it, then it downloads and restarts into the new version.

Only the installed (Setup.exe) build is Velopack-managed, so the portable exe and dotnet run quietly no-op.

Where it updates from

Straight from this repo's GitHub Releases — no separate update server. GithubSource lists releases, picks the newest non-prerelease, reads its releases.win.json feed + .nupkg assets, and compares against the running version.

Changes

  • Update/UpdateService.cs (new) — wraps Velopack UpdateManager, IsInstalled-guarded.
  • AppController.cs — startup + 6-hour check; reveals the tray prompt; failed checks are swallowed quietly.
  • TrayIcon.cs — the hidden-until-found update item + info balloon.
  • .github/workflows/release.yml — publish the Velopack feed (.nupkg + releases.*.json) as release assets, staged after the SignPath step so signing stays scoped to the exes. This is required — without the feed attached, the updater has nothing to read.
  • README.md — document the behavior.

Testing

  • dotnet build clean, 34/34 tests pass, app launches without regression.
  • End-to-end update can only be exercised from an installed build against a newer published release (dev runs no-op by design).

Notes

  • Always-on background checks with a prompt; a settings toggle to disable them can be added later if wanted.
  • Signing: ships unsigned for now. If code signing is adopted later, move it to pack-time so the exe inside the .nupkg is signed too.

Check GitHub Releases on startup and every six hours (installer build
only; the portable exe and dev runs no-op). When a newer stable release
is found, reveal a bold "Restart to update to vX.Y.Z" prompt at the top
of the tray menu and show a balloon; nothing installs until the user
clicks it, then it downloads and restarts into the new version.

Publish the Velopack feed (.nupkg + releases.*.json) as release assets
so the updater has a source to read, staged after the SignPath step so
signing stays scoped to the exe downloads.
@dvdstelt
dvdstelt force-pushed the feature/auto-update branch from d6b1819 to 62689a3 Compare July 15, 2026 12:10
@dvdstelt
dvdstelt merged commit f789b93 into main Jul 15, 2026
1 check passed
@dvdstelt
dvdstelt deleted the feature/auto-update branch July 15, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant