Skip to content

fix(ci): remove max-versions-to-keep from winget-releaser#607

Merged
loonghao merged 1 commit intomainfrom
fix/winget-max-versions-to-keep
Feb 18, 2026
Merged

fix(ci): remove max-versions-to-keep from winget-releaser#607
loonghao merged 1 commit intomainfrom
fix/winget-max-versions-to-keep

Conversation

@loonghao
Copy link
Owner

Summary

Removes the max-versions-to-keep parameter from the WinGet publishing workflow to prevent automatic version deletion issues.

Problem

The max-versions-to-keep: 5 parameter in .github/workflows/release.yml causes winget-releaser to automatically delete old versions when the version count exceeds 5. However, this feature has a bug that can incorrectly identify the highest version as "old" and attempt to delete it.

Example Issue

See microsoft/winget-pkgs#340410 where:

  • A new version was published to WinGet
  • The automated system created a PR to delete version 0.8.1
  • Version 0.8.1 was actually the highest version at that time
  • This happened because of a bug in the version comparison logic

Solution

Removed the max-versions-to-keep parameter to:

  1. Prevent automatic version deletion
  2. Let WinGet maintain version history naturally
  3. Avoid potential user disruption from incorrect deletions

Changes

Code Changes

  • .github/workflows/release.yml: Removed max-versions-to-keep: 5 parameter and added explanatory comment

Documentation Updates

  • docs/advanced/release-process.md: Added "WinGet Automatic Version Deletion" section in troubleshooting
  • docs/zh/advanced/release-process.md: Added Chinese translation of the same section

Testing

  • No code changes required (only CI configuration)
  • All pre-commit hooks passed (typos, prettier, etc.)

Impact

  • Positive: Prevents incorrect version deletions in WinGet
  • Neutral: WinGet will now maintain all versions naturally (no automatic cleanup)
  • No Breaking Changes: This only affects WinGet publishing behavior

Checklist

  • Code changes implemented
  • Documentation updated (English)
  • Documentation updated (Chinese)
  • All pre-commit hooks passed
  • Commit message follows conventional commits

Fixes #340410

@loonghao loonghao merged commit 21fa5f7 into main Feb 18, 2026
17 of 18 checks passed
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

Comments