Skip to content

Fix winget-publish: switch to wingetcreate update - #243

Merged
fernandotonon merged 1 commit into
masterfrom
fix/winget-publish
Apr 5, 2026
Merged

Fix winget-publish: switch to wingetcreate update#243
fernandotonon merged 1 commit into
masterfrom
fix/winget-publish

Conversation

@fernandotonon

@fernandotonon fernandotonon commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Problem

The winget-publish CI 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 + submit approach with wingetcreate update, which:

  • Takes --version, --urls, and --submit as explicit arguments — no YAML hand-crafting required
  • Pipes stdout+stderr via Tee-Object so any error from wingetcreate is visible in the CI log
  • Retries up to 5 times (30 s × attempt) to handle release-asset propagation delays
  • Inherits NestedInstallerFiles / PortableCommandAlias settings from the already-published manifest in microsoft/winget-pkgs

Also included

  • winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/ — manifests generated by scripts/update-winget.sh 2.20.0 for the 2.20.0 release (SHA256: C551020163802E9E725A585F9F4A72068CCB3830C2B4A394E3BD4A3FE3EFE7A2)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated Windows Package Manager support for QtMeshEditor 2.20.0, enabling users to install via winget install command.
    • Improved deployment automation for package publishing efficiency.

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>
@coderabbitai

coderabbitai Bot commented Apr 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR refactors the GitHub Actions WinGet publishing workflow to use automated wingetcreate update with built-in retry logic instead of manually creating and submitting manifests, and adds WinGet manifest files for QtMeshEditor version 2.20.0 specifying installer details, metadata, and locale information.

Changes

Cohort / File(s) Summary
Workflow Deployment Logic
.github/workflows/deploy.yml
Replaces two-phase manifest generation and submission process with single wingetcreate update command inside 5-attempt retry loop; removes ZIP download, SHA256 computation, and manual YAML file creation; adds exit code checking and success confirmation output.
WinGet Manifest Files
winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/*
Adds three manifest files for version 2.20.0: installer specification with ZIP format, portable command aliases (qtmesheditor, qtmesh), download URL and SHA256 checksum; locale manifest with package metadata, description, categories, and URLs; version manifest declaring package identity and default locale.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐇 Hops with glee! The manifests are neat,
With .yaml files arranged so sweet,
No more manual ZIP extraction found,
wingetcreate update spins around,
Retry loops catch stumbles with grace—
QtMeshEditor claims its WinGet space! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description addresses the Problem and Fix sections clearly, but deviates from the template structure which requires separate 'Summary', 'Technical Details', 'Features', and 'Bugfixes' sections. Reformat the description to follow the provided template structure: add a 'Summary' section, reorganize 'Technical Details' with bullet points, and categorize changes under ':bug: Bugfixes' or ':sparkles: Features' subsections.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix winget-publish: switch to wingetcreate update' clearly summarizes the main change: replacing the WinGet publishing approach with a new command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/winget-publish

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
.github/workflows/deploy.yml (1)

1681-1686: Minor: Consider using --out to inspect generated manifest on failure.

When wingetcreate update fails, adding --out ./winget-debug would 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 uses wingetcreate update instead.

These manifest files are not consumed by the deploy.yml workflow. The CI job at lines 1664-1698 uses wingetcreate update FernandoTonon.QtMeshEditor --version $ver --urls $url --submit, which fetches and updates the already-published manifest from microsoft/winget-pkgs, not these local files.

This creates maintenance confusion:

  • The hardcoded InstallerSha256 here won't be validated against actual release artifacts.
  • Changes to these files won't affect WinGet submissions.

Consider either:

  1. Removing these static files if they're only for reference, or
  2. Updating the workflow to validate/use these files, or
  3. Adding a comment clarifying these are templates for manual submissions or the scripts/update-winget.sh script.
🤖 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6707f00 and 0a38270.

📒 Files selected for processing (4)
  • .github/workflows/deploy.yml
  • winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.installer.yaml
  • winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.locale.en-US.yaml
  • winget/manifests/f/FernandoTonon/QtMeshEditor/2.20.0/FernandoTonon.QtMeshEditor.yaml

Comment on lines +9 to +10
- RelativeFilePath: bin\qtmesh.exe
PortableCommandAlias: qtmesh

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

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

Repository: 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 -10

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

@fernandotonon
fernandotonon merged commit d887efb into master Apr 5, 2026
12 checks passed
@fernandotonon
fernandotonon deleted the fix/winget-publish branch April 5, 2026 00:15
@sonarqubecloud

sonarqubecloud Bot commented Apr 5, 2026

Copy link
Copy Markdown

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