Skip to content

packaging: template winget manifests and add release publishing - #500

Draft
inqrphl wants to merge 3 commits into
mainfrom
winget-templates
Draft

inqrphl wants to merge 3 commits into
mainfrom
winget-templates

Conversation

@inqrphl

@inqrphl inqrphl commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

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_VERSION is the release tag without the leading v.
PACKAGE_VERSION is the MSI ProductVersion and the ARP DisplayVersion.
WinGet PackageVersion must match the installed MSI.
Installer URLs use TAG_VERSION.
The generated manifests are in packaging/winget/<package-version>/.

What changed

  • Add packaging/winget/templates/*.yaml.in.
  • Add buildtools/winget_manifests.sh.
  • Add buildtools/winget_manifests.ps1.
  • Add buildtools/get_winget_version.
  • Add the winget-manifests Makefile target.
  • Add packaging/winget/.gitignore for generated version directories.
  • Remove the static 1.01.0 manifests.
  • Add pkg-winget to the release workflow.
  • Add upload-winget-manifests to attach the zip to the draft release.
  • Add .github/workflows/winget.yml for API publishing.
  • Update packaging/RELEASE.md.

build_msi.ps1 is unchanged.
The PowerShell generator reads ProductCode, ProductVersion and SHA256 from the MSIs.

Release and publish flow

  1. The tag build creates the three MSIs.
  2. pkg-winget reads the MSIs and generates the manifests.
  3. pkg-winget runs winget validate.
  4. pkg-winget creates snclient-<tag>-winget-manifests.zip.
  5. upload-winget-manifests attaches the zip to the draft release.
  6. The release is published.
  7. .github/workflows/winget.yml publishes the zip to winget-pkgs.

The publish workflow uses the GitHub API to create blobs, a tree, a commit, a branch and a PR in the fork.
It does not clone the 500k-commit winget-pkgs repository.
A fork is still required for the PR head branch.
The fork is synced with merge-upstream before the commit.

Automation switch

WINGET_AUTOPUBLISH is set to false in the repository.
The release job is skipped while it is false.
Set it to true after the first package is merged.
Manual workflow_dispatch runs with dry_run=true by default.
Set dry_run=false to publish manually.

Setup:

  • Create a fork of microsoft/winget-pkgs.
  • Set WINGET_FORK_OWNER.
  • Add a classic PAT with public_repo as WINGET_TOKEN.
  • The PAT owner needs write access to the fork.

Supersedes #496

#496 used vedantmgoyal9/winget-releaser and the identifier ConSolMonitoring.SNClient.
It also used the release tag as the package version, which would be 1.02 instead of 1.02.0.
This PR keeps the release trigger and token/fork setup.
It replaces the action with the generated manifests and the API publisher.
It uses ConSol.SNClient and the MSI version.

Validation

  • The PowerShell generator was run with the three v1.01.0 release MSIs.
  • Its output matches the previously validated v1.01.0 manifests exactly.
  • The templates and workflows parse as YAML.
  • ShellCheck passes for both shell scripts.
  • winget validate succeeded on the generated 1.01.0 manifests.
  • The CI job runs winget validate on every release.
  • The shell generator was run on Linux.
  • Its output matches the v1.01.0 manifests exactly.

Reviewer test on Linux:

WINGET_PACKAGE_VERSION=1.01.0 \
WINGET_TAG_VERSION=1.01 \
WINGET_RELEASE_DATE=2026-10-29 \
WINGET_OUTDIR=packaging/winget/1.01.0 \
WINGET_SHA256_X64=... \
WINGET_SHA256_X86=... \
WINGET_SHA256_ARM64=... \
WINGET_PRODUCTCODE_X64='{...}' \
WINGET_PRODUCTCODE_X86='{...}' \
WINGET_PRODUCTCODE_ARM64='{...}' \
./buildtools/winget_manifests.sh

Reviewer test on Windows:

.\buildtools\winget_manifests.ps1 `
  -TagVersion 1.01 `
  -ReleaseDate 2026-10-29 `
  -MsiX64 <x64.msi> `
  -MsiX86 <x86.msi> `
  -MsiArm64 <arm64.msi>
winget validate --manifest packaging\winget\1.01.0

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_AUTOPUBLISH stays false until that PR is merged.

Checklist

  • PowerShell generator matches the validated 1.01.0 manifests.
  • Templates and workflows parse.
  • ShellCheck passes for both shell scripts.
  • Shell generator run on Linux.
  • Local winget validate of the generated 1.01.0 manifests.
  • pkg-winget job runs on the next tag.
  • First winget-pkgs submission.

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.
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