Fix winget-publish: switch to wingetcreate update - #243
Conversation
The previous `wingetcreate submit <dir>` approach silently exited with code 1 without showing any error output, making it impossible to diagnose. Replaced with `wingetcreate update` which: - Takes explicit version/URL args (no manual manifest assembly) - Pipes stdout+stderr through Tee-Object so errors are visible in CI - Retries up to 5 times with backoff for asset-propagation delays - Inherits NestedInstallerFiles from the already-published manifest Also adds winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/ generated by scripts/update-winget.sh for manual fallback / local record. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe PR refactors the GitHub Actions WinGet publishing workflow to use automated Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/workflows/deploy.yml (1)
1681-1686: Minor: Consider using--outto inspect generated manifest on failure.When
wingetcreate updatefails, adding--out ./winget-debugwould save the generated manifest locally for debugging without submitting. This could help diagnose issues like hash mismatches.💡 Optional: Add debug output on failure
.\wingetcreate.exe update FernandoTonon.QtMeshEditor ` --version $ver ` --urls $url ` --submit ` --token ${{ secrets.WINGET_TOKEN }} 2>&1 | Tee-Object -Variable output Write-Host $output - if ($LASTEXITCODE -eq 0) { $success = $true; break } + if ($LASTEXITCODE -eq 0) { $success = $true; break } + # On failure, save manifest for debugging + .\wingetcreate.exe update FernandoTonon.QtMeshEditor ` + --version $ver --urls $url --out ./winget-debug 2>&1 | Out-Null + if (Test-Path ./winget-debug) { Get-ChildItem ./winget-debug -Recurse | ForEach-Object { Get-Content $_.FullName } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/deploy.yml around lines 1681 - 1686, Update the .\wingetcreate.exe update invocation to save the generated manifest for debugging by adding the --out ./winget-debug flag (for example: .\wingetcreate.exe update FernandoTonon.QtMeshEditor --version $ver --urls $url --out ./winget-debug --submit --token ${{ secrets.WINGET_TOKEN }} 2>&1 | Tee-Object -Variable output), so that when the command fails you can inspect the manifest in ./winget-debug; ensure the existing capture (Tee-Object -Variable output) and Write-Host $output remain intact so failure logs and the saved manifest are available.winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.installer.yaml (1)
1-16: Static manifest files are inert — CI useswingetcreate updateinstead.These manifest files are not consumed by the
deploy.ymlworkflow. The CI job at lines 1664-1698 useswingetcreate update FernandoTonon.QtMeshEditor --version $ver --urls $url --submit, which fetches and updates the already-published manifest frommicrosoft/winget-pkgs, not these local files.This creates maintenance confusion:
- The hardcoded
InstallerSha256here won't be validated against actual release artifacts.- Changes to these files won't affect WinGet submissions.
Consider either:
- Removing these static files if they're only for reference, or
- Updating the workflow to validate/use these files, or
- Adding a comment clarifying these are templates for manual submissions or the
scripts/update-winget.shscript.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.installer.yaml` around lines 1 - 16, The static manifest contains a hardcoded InstallerSha256 and PackageIdentifier (FernandoTonon.QtMeshEditor) but CI uses the wingetcreate update command (wingetcreate update ... --urls ...) to fetch/update published manifests, so these local files are not validated or used; either remove the inert manifest if it’s only reference, or update the CI/deploy workflow to validate and upload these local manifests instead of calling wingetcreate update, or add a clear top-of-file comment in the manifest explaining it is a template/manual reference (and ensure InstallerSha256 is removed or marked placeholder) so maintainers are not misled by the unvalidated InstallerSha256; implement the chosen change consistently for all manifests with PackageIdentifier and InstallerSha256 fields.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.installer.yaml`:
- Around line 9-10: The portable alias points to bin\qtmesh.exe which is not
installed because the CMake install() only installs the APP_NAME target
(QtMeshEditor) while the qtmesh executable is created by add_executable(qtmesh
qtmesh_launcher.cpp); fix by either updating the manifest to point to the actual
installed executable (the APP_NAME target) or, preferably, add an install() for
the qtmesh target in CMake (e.g. install the qtmesh target's RUNTIME into bin)
so bin\qtmesh.exe exists and the PortableCommandAlias works; update the
CMakeLists (where add_executable(qtmesh ...) and the existing install() for
APP_NAME are defined) to include installation of the qtmesh target.
---
Nitpick comments:
In @.github/workflows/deploy.yml:
- Around line 1681-1686: Update the .\wingetcreate.exe update invocation to save
the generated manifest for debugging by adding the --out ./winget-debug flag
(for example: .\wingetcreate.exe update FernandoTonon.QtMeshEditor --version
$ver --urls $url --out ./winget-debug --submit --token ${{ secrets.WINGET_TOKEN
}} 2>&1 | Tee-Object -Variable output), so that when the command fails you can
inspect the manifest in ./winget-debug; ensure the existing capture (Tee-Object
-Variable output) and Write-Host $output remain intact so failure logs and the
saved manifest are available.
In
`@winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.installer.yaml`:
- Around line 1-16: The static manifest contains a hardcoded InstallerSha256 and
PackageIdentifier (FernandoTonon.QtMeshEditor) but CI uses the wingetcreate
update command (wingetcreate update ... --urls ...) to fetch/update published
manifests, so these local files are not validated or used; either remove the
inert manifest if it’s only reference, or update the CI/deploy workflow to
validate and upload these local manifests instead of calling wingetcreate
update, or add a clear top-of-file comment in the manifest explaining it is a
template/manual reference (and ensure InstallerSha256 is removed or marked
placeholder) so maintainers are not misled by the unvalidated InstallerSha256;
implement the chosen change consistently for all manifests with
PackageIdentifier and InstallerSha256 fields.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bef3e2e4-42e6-478a-ad5d-2b9a0b9dffe0
📒 Files selected for processing (4)
.github/workflows/deploy.ymlwinget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.installer.yamlwinget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.locale.en-US.yamlwinget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.yaml
| - RelativeFilePath: bin\qtmesh.exe | ||
| PortableCommandAlias: qtmesh |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify whether qtmesh is included in the install() directives
echo "=== Checking install() directives for qtmesh target ==="
rg -n 'install\s*\(' CMakeLists.txt src/CMakeLists.txt 2>/dev/null | head -20
echo ""
echo "=== Checking if qtmesh target is mentioned in any install() ==="
rg -nA5 'install.*qtmesh' CMakeLists.txt src/CMakeLists.txt 2>/dev/null || echo "No install() for qtmesh found"Repository: fernandotonon/QtMeshEditor
Length of output: 540
🏁 Script executed:
# Read the manifest file to verify the declarations
echo "=== Manifest file content ==="
cat -n "winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.installer.yaml"
echo ""
echo "=== Full install() section from CMakeLists.txt (starting at line 451) ==="
sed -n '451,500p' CMakeLists.txtRepository: fernandotonon/QtMeshEditor
Length of output: 2312
🏁 Script executed:
# Verify qtmesh target exists and is built
echo "=== Searching for qtmesh target definition ==="
rg -n 'add_executable.*qtmesh' src/
echo ""
echo "=== Checking if qtmesh_launcher.cpp exists ==="
fd qtmesh_launcher.cpp
echo ""
echo "=== Check src/CMakeLists.txt around the qtmesh definition ==="
rg -n 'add_executable' src/CMakeLists.txt | head -10Repository: fernandotonon/QtMeshEditor
Length of output: 558
bin\qtmesh.exe will not exist in the packaged ZIP — portable alias will fail.
The manifest declares bin\qtmesh.exe as a portable command, but the CMake configuration does not install the qtmesh target. While the target is built (via add_executable(qtmesh qtmesh_launcher.cpp) in src/CMakeLists.txt:316), the install() directive at CMakeLists.txt:451-454 only installs the APP_NAME target (QtMeshEditor), excluding qtmesh from the packaged ZIP.
Users installing via WinGet will get a broken qtmesh command alias pointing to a non-existent file.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.installer.yaml`
around lines 9 - 10, The portable alias points to bin\qtmesh.exe which is not
installed because the CMake install() only installs the APP_NAME target
(QtMeshEditor) while the qtmesh executable is created by add_executable(qtmesh
qtmesh_launcher.cpp); fix by either updating the manifest to point to the actual
installed executable (the APP_NAME target) or, preferably, add an install() for
the qtmesh target in CMake (e.g. install the qtmesh target's RUNTIME into bin)
so bin\qtmesh.exe exists and the PortableCommandAlias works; update the
CMakeLists (where add_executable(qtmesh ...) and the existing install() for
APP_NAME are defined) to include installation of the qtmesh target.
|



Problem
The
winget-publishCI job was failing silently —wingetcreate submit <dir>exited with code 1 but produced no visible error output, making it impossible to diagnose.Fix
Replace the fragile manual-manifest-assembly +
submitapproach withwingetcreate update, which:--version,--urls, and--submitas explicit arguments — no YAML hand-crafting requiredTee-Objectso any error from wingetcreate is visible in the CI logNestedInstallerFiles/PortableCommandAliassettings from the already-published manifest inmicrosoft/winget-pkgsAlso included
winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/— manifests generated byscripts/update-winget.sh 2.20.0for the 2.20.0 release (SHA256:C551020163802E9E725A585F9F4A72068CCB3830C2B4A394E3BD4A3FE3EFE7A2)🤖 Generated with Claude Code
Summary by CodeRabbit
winget installcommand.