Repository navigation
Conversation
Add shell and PowerShell manifest generators. Generate and validate manifests in the release workflow. Publish through the GitHub API without cloning winget-pkgs. Supersede the winget-releaser workflow from #496.
Run the version helper from the repository root. Avoid GNU dirname and cd options.
Use an explicit empty CDPATH for the script directory lookup.
Create the new version commit on the fork master. The PR adds only the new version directory.
Use a fine-grained token for fork branch and commit writes. Use a classic public_repo token for the upstream pull request.
Match the token name to the WINGET_FORK_OWNER variable. The PR token stays WINGET_PR_TOKEN.
| $message = if ($isNewPackage) { "New package: $packageIdentifier $packageVersion" } else { "Update $packageIdentifier to $packageVersion" } | ||
|
|
||
| # The fork master can be behind upstream. | ||
| # The PR adds only the new version directory, so the fork does not need to be current. |
There was a problem hiding this comment.
the most complicated part of the PR, and the hardest script section starts here.
uses the github HTTP API to create a new branch, upload files as blobs? , generates a commit JSON, uploads it etc.
Did not look into the references for every API call here.
|
The repository variables/secrets WINGET_FORK_OWNER , WINGET_FORK_TOKEN , WINGET_PR_TOKEN have been set. WINGET_AUTOPUBLISH is still false. |
|
AI did find some more things to check: Must fix before merge
Other mistakes worth fixing
|
Fix the manifest artifact name and release upload repository. Reuse one branch per package version and an open PR. Only treat HTTP 404 as a missing resource. Validate version components and ProductCodes in the shell generator.
|
I let my AI handle the concerns, here is its output ====================== Fixed in cceaeaf.
The workflows parse as YAML and the publisher PowerShell blocks parse. |
There was a problem hiding this comment.
🟡 Changes recommended
Relative output paths can cause generation failures or misplaced manifests after Set-Location, and incomplete ProductCode validation allows malformed GUIDs into generated manifests.
2 open issues
What changed in this PR
This PR adds WinGet manifest generation and publishing to SNClient’s release process. It keeps ConSol.SNClient and separates MSI package versions from release-tag versions.
Changes:
- Replace static manifests with templates and add shell and PowerShell generators.
- Generate, validate, and attach manifest archives during tagged builds.
- Add API-based publishing to
microsoft/winget-pkgs, with separate tokens, an automation switch, and manual dry runs.
| File | Description |
|---|---|
packaging/winget/templates/ConSol.SNClient.yaml.in |
Template the package version. |
packaging/winget/templates/ConSol.SNClient.locale.en-US.yaml.in |
Template the package version and release-notes URL. |
packaging/winget/templates/ConSol.SNClient.installer.yaml.in |
Template installer URLs, hashes, ProductCodes, and release metadata. |
packaging/winget/.gitignore |
Ignore generated version directories. |
packaging/RELEASE.md |
Document manual generation and automated publishing setup. |
Makefile |
Add manifest generation variables, target, and cleanup. |
buildtools/winget_manifests.sh |
Generate manifests from supplied installer metadata. |
buildtools/winget_manifests.ps1 |
Read MSI metadata and generate manifests on Windows. |
buildtools/get_winget_version |
Derive a three-part package version from the project version. |
.github/workflows/winget.yml |
Create fork branches and upstream pull requests through the GitHub API. |
.github/workflows/builds.yml |
Generate, validate, archive, and upload release manifests. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Only the winget_manifests.ps1 script remains, which is used in the CI.
Remove the unused get_winget_version helper. Document the PowerShell-only manual release flow.
|
Removed the shell generator and the unused Copilot's ProductCode and OutDir comments are fixed:
The PR body and |

AI GENERATED
Summary
This PR turns the WinGet manifests into templates.
It generates the manifests during the release workflow.
It validates the generated manifests with
winget validate.It attaches the manifests to the draft release.
It publishes the manifests through the GitHub API without cloning winget-pkgs.
It supersedes #496.
Package identifier
The package identifier stays
ConSol.SNClient.Two versions
TAG_VERSIONis the release tag without the leadingv.PACKAGE_VERSIONis the MSIProductVersionand the ARPDisplayVersion.WinGet
PackageVersionmust match the installed MSI.Installer URLs use
TAG_VERSION.The generated manifests are in
packaging/winget/<package-version>/.What changed
packaging/winget/templates/*.yaml.in.buildtools/winget_manifests.ps1.packaging/winget/.gitignorefor generated version directories.pkg-wingetto the release workflow.upload-winget-manifeststo attach the zip to the draft release..github/workflows/winget.ymlfor API publishing.WINGET_FORK_TOKENandWINGET_PR_TOKEN.packaging/RELEASE.md.build_msi.ps1is unchanged.The PowerShell generator reads
ProductCode,ProductVersionand SHA256 from the MSIs.Release and publish flow
pkg-wingetreads the MSIs and generates the manifests.pkg-wingetrunswinget validate.pkg-wingetcreatessnclient-<tag>-winget-manifests.zip.upload-winget-manifestsattaches the zip to the draft release.WINGET_FORK_TOKENcreates the branch and commit in the fork.WINGET_PR_TOKENopens the PR inmicrosoft/winget-pkgs.The publish workflow uses the GitHub API to create blobs, a tree, a commit and a branch in the fork.
The classic token opens the PR in
microsoft/winget-pkgs.It does not clone the 500k-commit winget-pkgs repository.
A fork is still required for the PR head branch.
The fork does not need to be current.
The commit is based on the fork master.
The PR adds only the new version directory.
The PR can show an out-of-date branch.
That is expected.
Automation switch
WINGET_AUTOPUBLISHis set tofalsein the repository.The release job is skipped while it is false.
Set it to
trueafter the first package is merged.Manual
workflow_dispatchruns withdry_run=trueby default.Set
dry_run=falseto publish manually.Setup:
microsoft/winget-pkgs.WINGET_FORK_OWNERtoinqrphl.WINGET_FORK_TOKEN.Contents: Read and writeoninqrphl/winget-pkgs.public_repoasWINGET_PR_TOKEN.microsoft/winget-pkgs.Supersedes #496
#496 used
vedantmgoyal9/winget-releaserand the identifierConSolMonitoring.SNClient.It also used the release tag as the package version, which would be
1.02instead of1.02.0.This PR keeps the release trigger and the fork setup.
It replaces the action with the generated manifests and the API publisher.
It uses
ConSol.SNClientand the MSI version.Validation
winget validatesucceeded on the generated 1.01.0 manifests.winget validateon every release.Reviewer test on Windows:
First submission
The first v1.01.0 submission is manual.
Generate the 1.01.0 manifests from the three release MSIs.
Copy them to
manifests/c/ConSol/SNClient/1.01.0/.WINGET_AUTOPUBLISHstays false until that PR is merged.Checklist
winget validateof the generated 1.01.0 manifests.pkg-wingetjob runs on the next tag.