mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-07-10 00:14:27 +00:00
## Summary - wire Winget submission into the stable release pipeline instead of relying on a separate `release.published` workflow - keep the existing release asset resolution and Komac-backed submission flow - document the new trigger model and manual fallback path ## Validation - `git diff --check origin/dev...HEAD` - `node --check scripts/winget/resolve-release-asset.cjs` - `node scripts/winget/resolve-release-asset.cjs --help` - live release metadata and asset-resolution dry-run against stable `v0.17.0` ## Notes - this fixes the case where a release created by GitHub Actions with the default `GITHUB_TOKEN` does not fan out into a second workflow run - assumes the existing Winget repo secret/variables remain configured - refs #462
2.6 KiB
2.6 KiB
Winget release automation
CodeNomad publishes Winget updates from the stable GitHub release pipeline. .github/workflows/reusable-release.yml now calls .github/workflows/update-winget.yml after the release assets finish uploading.
Trigger
- Runs as a reusable workflow from the stable release pipeline, after
build-and-uploadcompletes. - Resolves the target release by tag through the GitHub API, then exits early for draft or prerelease releases.
- Can also be rerun manually with
workflow_dispatchby supplying the stable release tag (and optionally the numeric release id). - This avoids the old
release.publishedtrap where a release created by GitHub Actions with the defaultGITHUB_TOKENdoes not fan out into a second workflow run. - Waits for the expected stable Windows Tauri asset because the release record can exist before all assets finish uploading.
Required configuration
Repository secret
WINGET_GITHUB_TOKEN: Classic GitHub PAT withpublic_reposcope.- The token owner must own the fork that submits to
microsoft/winget-pkgs. - Komac-based submission cannot open the PR with a fine-grained token today.
- The token owner must own the fork that submits to
Repository variables
WINGET_PACKAGE_IDENTIFIER(default fallback in workflow:NeuralNomadsAI.CodeNomad)WINGET_FORK_OWNER(default fallback in workflow:pascalandr)WINGET_WINDOWS_ASSET_NAME_TEMPLATE(default fallback in workflow:CodeNomad-Tauri-windows-x64-{version}.zip)WINGET_ASSET_WAIT_TIMEOUT_SECONDS(optional, default fallback:900)WINGET_ASSET_POLL_INTERVAL_SECONDS(optional, default fallback:15)
{version} is replaced from the release tag after trimming a leading v.
Runtime flow
- Resolve the target release by tag through the GitHub API, then derive the package version from the resolved release tag.
- Poll the release API until exactly one uploaded asset matches the configured Windows Tauri asset template.
- Download the matched asset once and compute a SHA-256 for logging and verification.
- Verify the PAT owner matches
WINGET_FORK_OWNERand that${WINGET_FORK_OWNER}/winget-pkgsis a fork ofmicrosoft/winget-pkgs. - Invoke
vedantmgoyal9/winget-releaser@v2, which uses Komac under the hood to update the existingNeuralNomadsAI.CodeNomadmanifest and open the PR.
Notes
- The workflow does not depend on a persistent local
winget-pkgsclone. - The current package in
winget-pkgsuses the release ZIP with a nested NSIS installer, so the workflow targets the stableCodeNomad-Tauri-windows-x64-{version}.zipasset. - If a maintainer publishes a release outside the standard release workflow, they should manually run
Update Wingetfor that stable tag.