This guide explains how to create a new BTChargeTrayWatcher release and submit the WinGet manifest using the scripts in tools/.
tools/build-installer-local.ps1tools/build-installer.ps1tools/release-all.ps1
-
build-installer-local.ps1- Publishes the app and builds an installer for local testing.
- Does not change version metadata files.
- Safe for dry-runs.
-
build-installer.ps1- Publishes and builds installer.
- Patches
installer/BTChargeTrayWatcher.issto the provided version (or csproj version). - Prints SHA256 and expected InstallerUrl/InstallerSha256 values.
-
release-all.ps1- Bumps version (minor by default, major with
-Major, or explicit with-Version). - Builds installer.
- Updates all
winget/*.yamlmanifests. - Validates manifests using
winget validate. - Commits + tags + pushes main repo.
- Creates GitHub release and uploads installer asset.
- Copies manifests into your
winget-pkgsfork and opens PR (unless-NoPR).
- Bumps version (minor by default, major with
- Windows + PowerShell
- .NET 10 SDK
- Inno Setup 6 (
winget install JRSoftware.InnoSetup) - Git + GitHub CLI (
gh) authenticated forpeterandree/BTChargeTrayWatcher - WinGet CLI (
winget) - Your
winget-pkgsfork cloned at:%USERPROFILE%\src\winget-pkgs
- Run tests before release:
dotnet test- Build a local installer smoke-check first:
.\tools\build-installer-local.ps1- Run full release automation:
.\tools\release-all.ps1Default behavior:
- version bump:
x.y.z -> x.(y+1).0 - commits, tags, pushes
- creates GitHub release
- opens winget-pkgs PR
- Explicit version:
.\tools\release-all.ps1 -Version 3.2.0- Major bump:
.\tools\release-all.ps1 -Major- Create draft GitHub release:
.\tools\release-all.ps1 -Draft- Skip WinGet PR creation:
.\tools\release-all.ps1 -NoPR- Force overwrite existing tag/release:
.\tools\release-all.ps1 -Version 3.2.0 -ForceIf you only want installer + manifest values first:
.\tools\build-installer.ps1 -Version 3.2.0Then:
- Update the three files under
winget/. - Validate:
winget validate .\winget- Copy manifests to:
%USERPROFILE%\src\winget-pkgs\manifests\p\Peterandree\BTChargeTrayWatcher\<version>\
- Commit/push in winget-pkgs and open PR to
microsoft/winget-pkgs.
Checked scripts:
tools/build-installer.ps1tools/build-installer-local.ps1tools/release-all.ps1
Verified:
- All three scripts parse correctly in PowerShell.
- Full release script now includes important guards and completeness fixes:
- Tool preflight checks (
git,gh,dotnet,winget) - Clean working-tree guard (unless
-Force) -Forcenow removes existing tag/release before recreating- Includes
installer/BTChargeTrayWatcher.issin release commit - More robust
winget-pkgsbranch handling and no-op PR skip
- Tool preflight checks (
-
winget validatefails:- Ensure installer URL points to the exact uploaded GitHub release asset.
- Recompute SHA256 from the produced installer.
-
ghrelease/PR fails:- Run
gh auth statusand re-authenticate if needed.
- Run
-
Inno Setup not found:
- Install with
winget install JRSoftware.InnoSetup.
- Install with
-
winget-pkgsPR step skipped:- Confirm your fork exists at
%USERPROFILE%\src\winget-pkgs.
- Confirm your fork exists at