Add winget auto-submission workflow#11
Conversation
New workflow fires on release:released (plus a workflow_dispatch retry lane) and uses vedantmgoyal9/winget-releaser@v2 to submit each release to microsoft/winget-pkgs as twibster.ScreenSound. installers-regex filters to the Inno Setup exe so the portable zip isn't submitted as an installer (which would fail validation). Requires a classic PAT with public_repo scope as WINGET_TOKEN — the default GITHUB_TOKEN can't push to the personal fork of winget-pkgs or open a PR upstream. Setup prerequisites (fork winget-pkgs, create PAT, add secret) are documented in the workflow header and the PR body. First auto-submission fires on whatever release cuts after this lands on main. Past releases aren't backfilled automatically; the dispatch input can target any prior tag if that changes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a new GitHub Actions workflow Changes
Sequence Diagram(s)sequenceDiagram
participant Release as "GitHub Release"
participant Actions as "GitHub Actions"
participant Releaser as "vedantmgoyal9/winget-releaser"
participant WingetRepo as "microsoft/winget-pkgs"
Release->>Actions: trigger on release (type: released) or workflow_dispatch(tag)
Actions->>Actions: read release artifacts\nfilter by '^ScreenSound-Setup-.*\.exe$'
Actions->>Releaser: invoke action with filtered installers\npass release-tag & WINGET_TOKEN
Releaser->>WingetRepo: submit manifest & installer info
WingetRepo-->>Releaser: accept/reject response
Releaser-->>Actions: return publish result
Actions-->>Release: workflow completion/status
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/winget.yml:
- Line 50: Replace the mutable tag on the GitHub Action usage
"vedantmgoyal9/winget-releaser@v2" with a specific commit SHA to pin the
dependency; update the workflow step that references
vedantmgoyal9/winget-releaser@v2 so it uses
vedantmgoyal9/winget-releaser@<full-commit-sha> (obtain the SHA from the action
repository's commit you trust), commit the updated workflow, and optionally add
a brief comment noting the pinned SHA and rationale for future updates.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 56f4590d-ead2-4407-beb4-febd6690f1b4
📒 Files selected for processing (1)
.github/workflows/winget.yml
The upstream @v2 major tag tracks the main branch and moves on every merge into it (v2 release published 2025-01-27, last moved to 4ffc788 on 2026-03-15). Referencing the mutable tag means upstream changes silently land in our pipeline whenever this workflow runs — a supply-chain integrity gap flagged in CodeRabbit review on #11. Pinning to the current SHA freezes that. Upgrade path and the exact commands to re-resolve the SHA are documented inline; a follow-up Dependabot config (github-actions ecosystem) would make this arrive as reviewable PRs instead of manual bumps.
Pairs with the SHA-pinned third-party action in winget.yml — without a bump mechanism, pinned SHAs go stale and every security patch requires manual re-resolution of the upstream tag. Weekly cadence (not daily to avoid noise, not monthly to avoid drift). Each auto-bump PR gets the `release:skip` label so the auto-release workflow doesn't cut a version for a CI-only change. Scope is intentionally just github-actions for now; nuget for the csproj package refs is a natural next step on the same pattern.
Summary
.github/workflows/winget.yml— fires onrelease: released, usesvedantmgoyal9/winget-releaser@v2to submit each new ScreenSound release tomicrosoft/winget-pkgsastwibster.ScreenSound.workflow_dispatchretry lane with an optionaltaginput so any prior release can be (re)submitted without re-cutting a release.installers-regexfilters the release assets down to the Inno SetupScreenSound-Setup-*.exe— the portable zip isn't a winget-installable artifact and would fail validation.release:skipso merging doesn't cut a version.One-time setup required before this is useful
The workflow will fail on its first run until these three things are done. None of them can be scripted — they all require your GitHub account.
microsoft/winget-pkgsto thetwibsteraccount. One click on the upstream repo. The fork is the staging area the action pushes manifest commits to before opening the upstream PR.public_repoonly. Give it a descriptive name (e.g.ScreenSound winget-releaser) and a reasonable expiry (12 months is fine; calendar a reminder).WINGET_TOKENat https://github.com/twibster/ScreenSound/settings/secrets/actions.GITHUB_TOKEN can't replace the PAT — the default token is scoped to this repo, so it can't push to
twibster/winget-pkgs(our fork) or open a PR targetingmicrosoft/winget-pkgs.First submission expectations
Microsoft's reviewers manually validate every new package's first submission to winget-pkgs (spam / brand / quality checks). That PR usually gets a response within a few days. Once merged, all subsequent updates auto-merge faster. If reviewers request changes, they'll comment on the PR — you'll see it via GitHub notifications on the
microsoft/winget-pkgsPR.Most fields are auto-detected from the Inno Setup installer's metadata (AppName, AppPublisher, AppId → PackageName, Publisher, ProductCode). Description, Tags, License, etc. come from the GitHub repo metadata and csproj
<Description>. If reviewers push back on any of those, we'll tweak and push a new release.Ordering note
First auto-submission will fire on the release after this lands on main. v2.1.0 already shipped without winget — that's per your "start with next release" choice. If you later decide v2.1.0 should go to winget too, trigger the
workflow_dispatchwithtag: v2.1.0after the setup above is done.Test plan
vedantmgoyal9/winget-releaserstep without auth failuremicrosoft/winget-pkgsgets opened with correcttwibster.ScreenSoundidentifier and theScreenSound-Setup-*.exeas the sole installerwinget install twibster.ScreenSoundworks from a clean Windows box once reviewers merge the upstream PRSummary by CodeRabbit