Skip to content

chore(ci): resume WinGet submission - #62414

Open
neriousy wants to merge 3 commits into
devfrom
winget-submission
Open

neriousy wants to merge 3 commits into
devfrom
winget-submission

Conversation

@neriousy

@neriousy neriousy commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Resumes submitting the WinGet manifests to microsoft/winget-pkgs, paused in #56262 until the packages were accepted. Both are in now: Anomaly.OpenCode and Anomaly.OpenCode.Desktop 2.0.29 were merged (microsoft/winget-pkgs#452561, microsoft/winget-pkgs#452562).

The commented-out call in script/publish.ts went away with #59046, along with script/publish-winget.ts, so this ports the submission to the new release pipeline instead of uncommenting it:

  • New .github/release/publish-winget.sh reads the manifests render-winget.sh already writes and opens one pull request per package from the WINGET_GITHUB_TOKEN owner's fork. It behaves like the old submit(): it skips versions already in winget-pkgs or with an existing PR, and reuses the branch left by a retried release.
  • Only stable (latest) releases that are not dry runs submit. Beta and dev releases skip the Submit step, and dry runs render and upload the manifests and skip without fetching the token.
  • publish-winget waits for publish-cli and publish-desktop, so the manifests only point at installers that are already published.
  • The token comes from AWS Secrets Manager, like the other release secrets since ci: read deploy and release secrets from aws secrets manager #62954: the job assumes github/opencode-release (stable, non-dry runs only, same condition as tag) and the Submit step reads opencode/release/WINGET_GITHUB_TOKEN through with-secrets.sh.
  • The Submit step is continue-on-error, so a WinGet rejection does not fail the release, which matches the old nothrow warning.

Before merging:

Until the secret exists, the Submit step fails visibly on stable releases but the release still succeeds.

@neriousy
neriousy requested a review from a team November 6, 2026 19:46

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one ordering problem worth fixing before merge; apart from that, the port works and matches the old submit().

I ran publish-winget.sh on the manifests render-winget.sh writes, with a stubbed gh. Beta releases and dry runs are skipped. A missing token exits with an error, which continue-on-error absorbs. A stable release makes the same API calls as the old script (fork, existing-version and existing-PR checks, tree and commit from upstream master, the PATCH fallback for a branch left by a retry, one PR per package), with the correct manifests/a/Anomaly/OpenCode[/Desktop]/<version> paths. I didn't run the real workflow or touch the real GitHub API.

Public API: unchanged (CI and release scripts only).

Concern: publish-winget doesn't wait for the jobs that upload the installers its manifests point to, so the WinGet PRs can be opened, and fail validation, before the files exist. Details are inline.

Comment thread .github/workflows/release.yml Resolved

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ordering problem from my last review is fixed. publish-winget now also waits for publish-cli and publish-desktop, so the WinGet PRs only open once the installers are on opencode.ai. On stable releases both jobs always run (the plan sets cli and desktop to true for latest), and a failure in either stops the submission. Nothing ran end to end, since that needs the release environment and the token.

Public API: unchanged (CI only).

Nothing new to raise.

@neriousy
neriousy requested a review from thdxr as a code owner November 17, 2026 23:00

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No new concerns. The ordering fix from my last review (waiting for publish-cli and publish-desktop) is still there after the rebase. The new commit reads the token from Secrets Manager the same way the other publish jobs do. AWS is only set up for stable, non-dry runs, Submit only runs on latest, and with-secrets.sh doesn't fetch the secret on dry runs. I tested it with stubbed aws and gh, not on a real release. A dry run skips without fetching anything. A stable run fetches opencode/release/WINGET_GITHUB_TOKEN from us-east-1, masks it and opens both PRs.

Public API: unchanged (CI only).

This branch has not been deployed

No deployments
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