Skip to content

Automate winget submission for stable UI releases#12309

Open
niksedk wants to merge 1 commit into
mainfrom
feature/winget-auto-publish
Open

Automate winget submission for stable UI releases#12309
niksedk wants to merge 1 commit into
mainfrom
feature/winget-auto-publish

Conversation

@niksedk

@niksedk niksedk commented Jul 9, 2026

Copy link
Copy Markdown
Member

Closes #12292 (the automation part — the 5.0.0 bump itself still needs one manual/first run, see below).

What

Adds a publish-winget job to the UI release workflow that automatically opens a version-bump PR against microsoft/winget-pkgs for Nikse.SubtitleEdit whenever a stable release is published.

How

  • Runs after create-release, only when create_release is true and is_prerelease is false.
  • Extra tag guard: suffixed tags (v5.1.0-beta12) and auto-generated pre-release-* tags are skipped even if the run was accidentally not marked as a pre-release; the job also skips gracefully (with a warning) if the WINGET_TOKEN secret is missing.
  • Uses winget-releaser (pinned to the v2 commit), which drives komac — the same tool used for the existing 4.0.x manifests. Komac downloads the installer and re-derives ProductCode/architecture from the binary itself. That matters here: the v5 Inno installer has a new AppID ({B5E6D1E0-…}_is1), while the pre-5.x manifests say SubtitleEdit_is1 and list x86+x64 — a plain manifest copy would carry the stale values forward.
  • The winget PackageVersion is the release tag without the v prefix (e.g. 5.1.0), and only SubtitleEdit-Windows-x64-Setup.exe is matched as the installer.

Setup required (one-time, before the next stable release)

  1. Create a classic PAT with public_repo scope on the niksedk account (fine-grained tokens are not supported by the action).
  2. Add it as a repo secret named WINGET_TOKEN.
  3. The fork it pushes to is https://github.com/niksedk/winget-pkgs, which already exists (fork-user: niksedk).

Note on 5.0.0

This only fires on future release runs. For the already-published 5.0.0 (or once 5.1.0 goes stable, which supersedes it), a one-off submission can be done locally with:

komac update Nikse.SubtitleEdit --version 5.0.0 \
  --urls https://github.com/SubtitleEdit/subtitleedit/releases/download/v5.0.0/SubtitleEdit-Windows-x64-Setup.exe \
  --submit

🤖 Generated with Claude Code

Add a publish-winget job to the UI release workflow that opens a
version-bump PR against microsoft/winget-pkgs for Nikse.SubtitleEdit
after a stable (non-pre-release) release is published.

Uses komac via winget-releaser, which downloads the installer and
re-derives ProductCode/architecture from the binary - needed because
the v5 Inno installer's AppID differs from the SubtitleEdit_is1
ProductCode in the pre-5.x manifests.

Skipped for pre-releases, suffixed tags (v5.1.0-beta12), auto-generated
pre-release-* tags, and when the WINGET_TOKEN secret is absent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

Update winget package to Subtitle Edit 5.0.0

1 participant