Document winget classic PAT requirement in release config - #6692
Merged
Merged
Conversation
The v0.50.0 release failed in GoReleaser's winget publisher with "401 Bad credentials" against stacklok/winget-pkgs — the WINGET_GITHUB_TOKEN classic PAT had expired or been revoked. Nothing in the release config explained why winget uses a static PAT while the homebrew tap uses a short-lived GitHub App token, inviting a well-meaning migration to an App token that would fail differently: winget opens a cross-account PR from the stacklok/winget-pkgs fork into microsoft/winget-pkgs, which only a classic PAT can do. App and fine-grained tokens are scoped to a single account and cannot open that PR (403 Resource not accessible by integration). Add comments to .goreleaser.yaml and releaser.yml capturing this constraint and the rotate-and-rerun remedy for a 401, so the operational knowledge lives with the code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6692 +/- ##
=======================================
Coverage 79.18% 79.19%
=======================================
Files 795 795
Lines 80380 80380
=======================================
+ Hits 63652 63659 +7
+ Misses 16723 16716 -7
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rdimitrov
approved these changes
Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The v0.50.0 release (run 35362582357) failed in GoReleaser's winget publisher:
401 Bad credentialsmeans theWINGET_GITHUB_TOKENclassic PAT expired or was revoked. Unblocking the release is an operational task (rotate the secret, re-run the job) — but the reason this token exists as a static PAT was undocumented, which is a trap: the release config carefully explains the homebrew-tap App token and macOS signing, so the natural next step is to "modernize" winget onto a GitHub App token too. That migration would re-break releases, just with a different error.Winget is not like the homebrew tap. GoReleaser commits the homebrew formula directly to
stacklok/homebrew-tap(a repo the App is installed on), but the winget pipe pushes a branch to thestacklok/winget-pkgsfork and then opens a cross-account PR intomicrosoft/winget-pkgs. Only a classic PAT with fullreposcope can open a fork→upstream PR — GitHub App installation tokens and fine-grained PATs are scoped to a single account and get403 Resource not accessible by integrationcreating that PR.This PR adds comments to
.goreleaser.yamland.github/workflows/releaser.ymlcapturing that constraint and the "a 401 means rotate-and-rerun" remedy, so the knowledge lives with the code. No behavior change.Type of change
Test plan
Does this introduce a user-facing change?
No.
Special notes for reviewers
This does not fix the failed release — that needs an admin to rotate
WINGET_GITHUB_TOKEN(ideally a bot account's classic PAT with a tracked expiry) and re-run the failed job. This PR only prevents the footgun of migrating winget to an App token.🤖 Generated with Claude Code