Files
CommandForge/UPDATES.md
T
poli0981andClaude Opus 4.8 f0d62490f2 Phase 6c: CI/CD, Velopack release pipeline, version-flow fix, build/update docs
Workflows (.github/workflows/):
- build.yml: Windows restore + dotnet format --verify + Release build
  (0-warning gate) + tests, on PR/push to main.
- codeql.yml: project-specific CodeQL C# (Windows, builds CommandForge.slnx).
  The shared reusable codeql-csharp.yml runs on Linux and expects a .sln, so
  it cannot build this WPF/.slnx app.
- release.yml: on tag v*, install vpk, download the previous release for the
  delta base (continue-on-error on first release), publish self-contained +
  vpk pack, publish the GitHub Release (vpk upload github), attach SHA-256
  checksums.txt, and optionally submit to VirusTotal (gated on VT_API_KEY).
- announce-release.yml + notify-ci-failure.yml: thin callers of the reusable
  Discord workflows in poli0981/.github (secrets: inherit).
- dependabot.yml: weekly nuget + github-actions updates.

Fix: scripts/pack.ps1 now passes -p:Version/-p:InformationalVersion to
dotnet publish, so the in-app "App version" matches the release tag instead of
defaulting to 1.0.0.

Docs (English, public): BUILD.md, RELEASING.md, UPDATES.md — including the
Velopack update mechanism (first vs subsequent release and how deltas are
produced) and the required repo secrets.

No source changes; 0-warning Release build, 104 tests pass; actionlint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 19:27:49 +07:00

2.5 KiB

How updates work (Velopack)

CommandForge installs and updates itself with Velopack. Updates are per-user and need no UAC.

For users

  1. Download CommandForge-win-Setup.exe from the latest release and run it. It installs per-user under %LocalAppData%\CommandForge.
  2. After that, the app checks GitHub Releases for newer versions (on startup if enabled, or via Help → Check for updates / F5) and updates itself. When a newer version exists it downloads the update (a small delta when possible) and applies it on restart.

The only network connection involved is to GitHub (see PRIVACY.md). Update errors are mapped to clear messages: offline, not found (404), rate limited (403/429), and server error (5xx).

How it works under the hood

  • The app calls VelopackApp.Build().Run() at startup to handle install/update/uninstall hooks.
  • It checks for updates via UpdateManager(new GithubSource("https://github.com/poli0981/CommandForge", null, prerelease: false)).
  • Auto-update only works for an installed build (not a dev/portable run); the app detects this and hides update prompts otherwise.

Release artifacts and the delta mechanism

Each release (see RELEASING.md) uploads the contents of Releases/:

Asset Purpose
CommandForge-win-Setup.exe First-time installer
CommandForge-<version>-full.nupkg Full package (fallback / first install of a version)
CommandForge-<version>-delta.nupkg Delta from the previous version (small download)
releases.win.json / RELEASES Update manifest the client reads
checksums.txt SHA-256 of the assets (manual verification)

First release (e.g. v0.3.0): there is no previous version, so only a full package + Setup.exe + manifest are produced and uploaded.

Subsequent releases (e.g. v0.3.1): Velopack needs the previous -full.nupkg present while packing to compute the delta. The release workflow does this automatically by running vpk download github before vpk pack, so each release after the first produces both a -full.nupkg and a -delta.nupkg. Clients already on 0.3.0 download only the small -delta.nupkg; the full package remains the fallback.

If you ever build a release locally, run vpk download github --repoUrl <repo> first so the prior full package is available for the delta — otherwise only a full package is produced.