Repository navigation
feat(ci): add winget manifest automation - #1318
Conversation
Auto-submit updated manifests to microsoft/winget-pkgs on stable releases using vedantmgoyal9/winget-releaser. Windows users can now install via `winget install rtk-ai.rtk`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This PR fixes issue #383 |
|
Pinging @aeppling |
Move placement to make winget command easier to find Add winget commands into other documentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Above commit adds winget docs into other language README's, I missed that in the first commit |
|
@pszymkowiak is this eligble for review? |
|
Could this please be approved? |
Match the hardening applied to the release, homebrew and notify-discord jobs in 9cc4937: interpolate inputs.tag and github.event.release.tag_name into env vars rather than into the run script body.
- README_pt.md: add the winget section (only translation missing it)
- docs/guide/getting-started/installation.md: add winget install and
uninstall entries
- README_{es,fr,ja,ko,zh}.md: drop the superlative from the winget
heading so all seven READMEs read "winget (Windows)", matching the
existing "Homebrew (recommended)" convention
- README.md: shorten the Native Windows heading to "(manual install)",
move the winget pointer into prose
Deliberately out of scope: docs/guide/getting-started/installation.md
still tells Windows users to use WSL "for full hook support". README.md
contradicts this - native Windows hooks have worked since v0.37.2.
Correcting it means rewriting text this PR does not otherwise touch, so
it is left for a separate change.
|
(Opus says:) Two prerequisites for this job, both on the maintainer side: 1. 2. This replaces an existing manual process. Minor note, no action needed here: existing manifest folders are inconsistent — |
KuSh
left a comment
There was a problem hiding this comment.
Round 1 of 3 — CHANGES REQUESTED
Claim: automate winget manifest submission on stable releases, and document winget install rtk-ai.rtk across the install docs.
Scope: accept (round 1, frozen). Fixes #383 is accurate. Overlaps #3775 on action pinning — narrow fix asked for here, not a wait. Not a duplicate of #2773 (Chocolatey, different manager).
Ran: winget-releaser@v2 action.yml read in full; cd.yml → release.yml call paths traced; installers-regex matched against the 10 real assets of v0.48.0; the published rtk-ai.rtk manifests read; YAML parsed; merges clean on develop@8e9aa04c.
CI @2f905f7b: only license/cla green — the CI run is action_required and has never built this head. A maintainer needs to approve it.
Thanks for the rebase and for the research in your last comment — the manifest-inconsistency note in particular saved me a trip.
Blocks merge (1, frozen at round 1)
.github/workflows/release.yml:372— the winget job is not fail-isolated (regression againstdevelop). See the inline comment.update-latest-tagisneeds: [release-please, build-release]with noif: always(), so a red winget job leaves thelatesttag on the previous version. Fix iscontinue-on-error: trueon the job.
Optional — will not hold merge
-
Pin
winget-releaser.@v2is a mutable major tag and that step receivesWINGET_TOKEN, a classic PAT with write access to public repositories. #3775 is currently pinning exactly this class across the repo (release-please-action@v4,rust-toolchain@stable,action-gh-release@v2); doing it here avoids that PR having to come back for a seventh.v2resolves to4ffc7888bffd451b357355dc214d43bb9f23917etoday, so the pin is behaviour-identical:- uses: vedantmgoyal9/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e # v2
-
docs/guide/getting-started/installation.md:3— the frontmatterdescription:still reads "via curl, Homebrew, Cargo, or from source". It renders as the page's meta description and search snippet, so the docs site advertises a method list that omits the one this PR promotes. Addingwinget,afterHomebrew,closes it. -
feat(ci):will have release-please cut a minor bump for a change that ships no binary difference; CONTRIBUTING.md maps CI tochoreand the documented scope iscicd, notci. Genuinely arguable — a new install channel is a real user-facing feature — and it's your call, not a blocker.
Checked and correct — no need to re-verify
- Job wiring.
cd.yml's pre-release path passesprerelease: true→ job skipped; the stable path omits it → defaultsfalse→ job runs.secrets: inheritcarriesWINGET_TOKENinto the reusable workflow. Matcheshomebrewandnotify-discordexactly. release-tag:(commit69cd16ee) is necessary, not cosmetic. The action's default isgithub.event.release.tag_name || github.ref_name, and this workflow has noreleasetrigger, so the default would resolve to a branch name. Good catch.installers-regexmatched exactly 1 of the 10 real assets onv0.48.0.- zip installer. The published
v0.48.0manifest isInstallerType: zip/NestedInstallerType: portable/RelativeFilePath: rtk.exe; komac carries that shape forward, so no hand-editing. ${TAG#v}matches 13 of the 15 published folders.- Doc coverage is complete and consistently placed: 7 READMEs (all after Homebrew, before Quick Install),
INSTALL.md(install + uninstall), docs site (install + uninstall). The#winget-windowsanchor resolves. - No
CHANGELOG.mdedit — correct, it's release-please-generated.
Hypotheses built and dropped
- "
WINGET_TOKENisn't set, so the next release goes red."gh secret list --reposhows six secrets andHOMEBREW_TAP_TOKENisn't among them either — yetrtk-ai/homebrew-tapis at0.48.0, so that job ran fine with it. They're org-level. WhetherWINGET_TOKENexists is undetermined from outside. - "Translated READMEs are missing the
Prefer wingetcross-link." They carry no Windows section at all (22 headings vs 42 inREADME.md). Not a gap. - "
openclaw/README.mdmentionsbrew install rtkand is missing winget." It's a bash-only prerequisite block for a Linux/macOS plugin. - "The
github.event.release.tag_namefallback is dead code." True — noreleasetrigger — but copied verbatim from both sibling jobs. Pre-existing, not yours.
Your questions
- "
WINGET_TOKENneeds a forked winget-pkgs, not just a PAT." — Right that a fork is needed, but not on the token owner's account.fork-useris unset here, so it defaults togithub.repository_owner=rtk-ai, and the action exportsKOMAC_FORK_OWNER=rtk-ai. komac will push its working branch tortk-ai/winget-pkgs, which 404s. So even with a validWINGET_TOKENthe job goes red. Two ways to close it, maintainer's call: forkmicrosoft/winget-pkgsinto thertk-aiorg and give the PAT push access (no workflow change), or addfork-user: <pat-owner-login>to the step.kerta1nandwxxb789already have forks;smoochydoes not. This is release-time setup, not a merge blocker — but it is why finding 1 matters. - "Whoever is next to release should hold off on a manual submission." — Agreed, noted.
- "Existing folders are inconsistent; this submits bare and matches the majority." — Confirmed, 13/15 bare. No action. One thing worth a check on a Windows box, though: if winget sorts
v0.48.0below0.46.0, thenwinget install rtk-ai.rtkcurrently resolves to0.46.0, and the docs this PR adds point Windows users at a several-releases-old build until the first automated submission lands. Not this PR's to fix — a cleanup PR against winget-pkgs removing the twov-prefixed folders would.
Next
Add continue-on-error: true to the winget job. That is the only thing holding merge — the pin and the frontmatter line are welcome in the same push but won't block. Then a maintainer needs to approve the CI run, and set up the fork before the next stable release.
Rounds: 1/3. Threads: 0 open, 2 resolved.
The winget job sat in the release workflow's critical path: cd.yml gates update-latest-tag on build-release without `if: always()`, so a failed manifest submission would fail release.yml and leave the 'latest' tag on the previous version. Mark the job continue-on-error so a submission failure cannot hold back the release. Pin winget-releaser to 4ffc7888bffd451b357355dc214d43bb9f23917e (v2) rather than the mutable major tag, matching the pinning underway across the repo. The step receives a classic PAT with write access to public repositories, so the resolved ref should not be able to move underneath it.
The frontmatter description renders as the page's meta description and search snippet, so it advertised an install method list that omitted the one the page now documents.
|
All three addressed in
On the commit type: leaving Two follow-ups on your findingsYour Windows check — the concern doesn't hold. Ran it on winget v1.29.290: The comparator does not sort the
Two asks1. Could a maintainer dismiss Odonno's April review? Both of its inline comments were addressed in 2. CI has never built this head. Checks are sitting at |
The v2 tag is the action's only tag and has not moved since 2024-11-27, while development continued on main. Four fixes sit between them, one of which matters here: the action runs cargo binstall komac, and cargo is missing on ubuntu-slim runners without it. Pin to the most recent functional commit rather than to main, whose two newer commits are documentation only. Its inputs are a superset of the tag's, so the step needs no other change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
KuSh
left a comment
There was a problem hiding this comment.
Round 2 of 3 — APPROVED
Claim: automate winget manifest submission on stable releases, and document winget install rtk-ai.rtk across the install docs.
Scope: accept (frozen at round 1).
Ran: release.yml parsed at each head to check where continue-on-error actually landed; a43926ed's own action.yml checked for input compatibility; Odonno's two threads diffed from their original commit bd141209 to the head; merge against the latest develop re-checked.
CI @e8a1ef82: green.
All three round-1 items are in, and applied correctly.
Blocks merge (0 — was 1, fixed in 7b09caad)
The fail-isolation finding is closed. I checked the placement rather than the diff, because step-level continue-on-error would have looked identical in review and behaved differently: parsing the file at the head puts it on the job, which is what the finding needed.
One caveat worth stating rather than implying: I verified where it sits, not that GitHub then keeps build-release green. That a continue-on-error job does not fail its workflow run is documented behaviour, but exercising it needs a real release, so the first stable release after this merges is where it gets proven.
Fixup pushed — e8a1ef82
I asked for the pin in round 1 and pointed you at the wrong commit, so I have corrected it rather than leaving you to discover it.
4ffc7888 is genuinely what @v2 resolves to, so your 7b09caad did exactly what I asked. The problem is @v2 itself: it is the action's only tag and has not moved since 2024-11-27, while development continued on main. Ten commits separate them, four of which are fixes — cargo command not found in ubuntu-slim runner (a43926ed), pwsh doesn't sort sometimes (19e706d4), unexpected argument '' found (komac) (3e78d7ff), automatically sync winget fork (e83bb785). The ubuntu-slim one is a live risk here, since the action runs cargo binstall komac on ubuntu-latest.
e8a1ef82 moves the pin to a43926ed822e5a076ac8a81e0a794915cbad51d1 — the most recent functional commit, since the two above it on main are documentation only. I checked that commit's own action.yml before pushing: its inputs are a superset of the tag's, and fork-user keeps its semantics, so the with: block needed no other change. The comment above the step records why it points at a commit rather than a tag, so nobody restores @v2 later.
Optional — applied, threads resolved by me
Frontmatter description: now lists winget.
Checked and correct — no need to re-verify
Job wiring against cd.yml's pre-release and stable paths; secrets: inherit; release-tag: being necessary rather than cosmetic; installers-regex matching exactly 1 of the 10 real assets on v0.48.0; the zip / NestedInstallerType: portable shape carrying forward through komac; ${TAG#v} matching 13 of 15 published folders; doc coverage across 7 READMEs, INSTALL.md and the docs site; no CHANGELOG.md edit. Re-checked this round: still merges clean on the latest develop.
Hypotheses built and dropped
- Mine, disproven by your execution. I suggested
winget install rtk-ai.rtkmight resolve to0.46.0because the twov-prefixed folders could sort below the bare ones. Yourwinget show rtk-ai.rtkon v1.29.290 returnsVersion: v0.48.0, so the comparator handles it and the docs this PR adds are accurate today. No winget-pkgs cleanup needed — that one was mine to run and I could not, so thank you for closing it. - Carried from round 1 and still dropped: the
WINGET_TOKEN-is-missing claim (org-level secrets are not visible togh secret list --repo—HOMEBREW_TAP_TOKENis not either, yet the tap is current); the translated-README cross-link gap (they carry no Windows section at all);openclaw/README.md; the deadgithub.event.release.tag_namefallback (pre-existing in both sibling jobs).
Your questions
- "Could a maintainer dismiss Odonno's April review?" — Yes, and I have. I checked it rather than taking the ask at face value, and you are right on both threads: the README comment was anchored on the heading
### winget (Windows — easiest), which is now### winget (Windows). My round-1 note that "the head still reads Easiest way" was wrong — I read the head cold and judged it by the body sentence instead of diffing the anchored region frombd141209. The French thread carries Odonno's wording verbatim. - "CI has never built this head." — Fixed; I approved the run on both of the last two heads. Note that PR CI only parses
release.yml, it never executes it, which is why the caveat above matters. - "Happy to add the
fork-userline here if that's the preferred route." — Not needed, leave it out. The fork is going under thertk-aiorg, which is whatfork-user's default already points at. Your diagnosis of the 404 was correct and matched mine; we will handle the setup on our side. - "Leaving
feat(ci):as-is." — Your call, accepted. It was non-blocking and not worth a force-push.
Next
Approved. On hold until #3868 (Next Release) ships — this adds a job to release.yml, so it should not land mid-release. It merges as-is straight after that.
Thanks for the turnaround on this one, and for running the winget check on Windows — that settled a question I had no way to answer.
Rounds: 2/3. Threads: 0 open, 3 resolved.
Both inline comments were addressed in d38cce2: the heading flagged here is now ### winget (Windows), and the French wording was applied verbatim. Verified by diffing the anchored regions from bd14120 to the current head; both threads are resolved. Dismissing so the stale review state does not sit on an approved PR.
Summary
wingetjob to the release workflow that auto-submits updated manifests tomicrosoft/winget-pkgson stable releases viavedantmgoyal9/winget-releaser@v2winget install rtk-ai.rtkto README.md and INSTALL.md installation docswinget uninstall rtk-ai.rtkto INSTALL.md binary removal sectionThe job follows the same pattern as the existing
homebrewandnotify-discordpost-release jobs: guarded by!inputs.prerelease, depends on[release], runs onubuntu-latest.Prerequisites
Before this automation works, the repo owner needs to:
public_reposcopeWINGET_TOKENTest plan
wingetjob only runs on stable releases (!inputs.prereleaseguard)microsoft/winget-pkgsFixes #383
🤖 Generated with Claude Code