Draft winget and PowerShell Gallery publishing assets - #72
Merged
Merged
Conversation
Prepare the publishing paths so they are ready once credentials are available. PowerShell Gallery: Publish-Winnow.ps1 builds the self-contained standalone, injects a PSScriptInfo block with a fixed script GUID, validates with Test-ScriptFileInfo, and publishes only when given an API key. The modular Winnow.ps1 cannot be a gallery script because it dot-sources the tree, so the standalone is what ships. Dry run verified locally: Test-ScriptFileInfo passes (Winnow 4.2.3, correct GUID and author). winget: three-file manifest for BiosSystem.Winnow, schema 1.12.0, packaged as a zip with a portable entry point. Verified with `winget validate` that the portable nested installer accepts only a .exe path, so a script entry point is rejected and Winnow cannot go to winget without a launcher exe. The manifest is written for that resolved state and the README documents the blocker and the two options (add a launcher exe, or ship PowerShell Gallery only). Nothing here publishes on its own; both paths need the account credentials.
winget's portable installer accepts only a .exe entry point, which Winnow lacked. Add the launcher as source, not a committed binary: Winnow.cs finds Winnow.ps1 next to itself and starts it with a UAC prompt (the same handoff Run.bat does), and Build-Launcher.ps1 compiles it with the .NET Framework C# compiler already on Windows. Winnow.exe is gitignored so only source ships. Verified locally: the launcher compiles to a valid 5 KB .NET assembly. The winget manifest already points RelativeFilePath at Winnow.exe; the README now documents building it, including the release-workflow step, so the winget path is executable rather than blocked. Including the launcher in releases is still a deliberate choice for the maintainer, kept out of the default build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft. Publishing assets staged so both distribution paths are ready once credentials are available. Nothing here publishes on its own.
PowerShell Gallery
Publishing/PowerShellGallery/Publish-Winnow.ps1builds the self-contained standalone, injects aPSScriptInfoblock with a fixed script GUID (0e5a6893-36f8-46da-b8b8-0d9500d7a492), validates withTest-ScriptFileInfo, and publishes only when-ApiKeyis passed. The modularWinnow.ps1cannot be a gallery script (it dot-sources the tree), so the standalone is what ships.Verified locally (dry run, no key):
Test-ScriptFileInfopasses - Name Winnow, Version 4.2.3, correct GUID and author.winget
Three-file manifest for
BiosSystem.Winnow, schema 1.12.0, packaged as a zip with a portable entry point.winget validateconfirmed the portable nested installer accepts only a.exeRelativeFilePath(Run.bat/.ps1 rejected). Winnow had no executable, so this is resolved with a launcher shipped as source, not a committed binary:Publishing/launcher/Winnow.cs- minimal C# launcher that startsWinnow.ps1next to it with a UAC prompt.Publishing/launcher/Build-Launcher.ps1- compiles it with the .NET Framework C# compiler already on Windows;Winnow.exeis gitignored.Verified locally: the launcher compiles to a valid 5 KB .NET assembly. The manifest's
RelativeFilePathisWinnow.exe;Publishing/README.mddocuments building it (including the release-workflow step). Including the launcher in releases stays a deliberate maintainer choice, kept out of the default build.Testing
winget validaterun locally; constraint and resolution documented.