Skip to content

Automate winget package submission#20029

Merged
seanbudd merged 11 commits into
nvaccess:masterfrom
mdanish-kh:winget-ci-automation
Jun 3, 2026
Merged

Automate winget package submission#20029
seanbudd merged 11 commits into
nvaccess:masterfrom
mdanish-kh:winget-ci-automation

Conversation

@mdanish-kh

Copy link
Copy Markdown
Contributor

Link to issue number:

Summary of the issue:

PR adds a post-release step to the current CI to submit the updated manifest to WinGet Community Repository. microsoft/winget-create is the tool used for creating and submitting the manifest through a PR

If the maintainers approve of this change, we need to then add a repository secret named WINGET_CREATE_GITHUB_TOKEN that's a public access token (classic) with public_repo scope from the user account where the winget-pkgs fork will exist for submitting a PR. Recommend using a bot account for this purpose.

Description of user facing changes:

WinGet users may see less delay in NVDA packages being published at the WinGet repository. Follows from the conversation in https://x.com/NVAccess/status/2046802073312960733

Description of developer facing changes:

N/A

Description of development approach:

Use a GitHub Action workflow similar to how implemented in the following repos:

Testing strategy:

Tested the commands locally on my machine using placeholder values for ${{ github.ref_name }} & ${{ github.repository }}. For testing with wingetcreate just omit the --submit flag to avoid sending an actual PR.

wingetcreate.exe update NVAccess.NVDA `
--version 2025.3.3 `
--urls https://github.com/nvaccess/nvda/releases/download/release-2025.3.3/nvda_2025.3.3.exe

Known issues with pull request:

The WINGET_CREATE_GITHUB_TOKEN needs to be kept updated and unfortunately one can not use a fine-grained token at the moment (blocked by lacking GitHub API support)

Code Review Checklist:

Most of this is unrelated to my change as it's only a GitHub action workflow, not a change in the product itself. Let me know though if I need to update any documentation.

- [ ] Documentation:
- Change log entry
- User Documentation
- Developer / Technical Documentation
- Context sensitive help for GUI changes
- [ ] Testing:
- Unit tests
- System (end to end) tests
- Manual testing
- [ ] UX of all users considered:
- Speech
- Braille
- Low Vision
- Different web browsers
- Localization in other languages / culture than English
- [ ] API is compatible with existing add-ons.
- [ ] Security precautions taken.

Copilot AI review requested due to automatic review settings April 28, 2026 16:09
@mdanish-kh mdanish-kh requested a review from a team as a code owner April 28, 2026 16:09
@mdanish-kh mdanish-kh requested a review from SaschaCowley April 28, 2026 16:09

Copilot AI 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.

Pull request overview

Adds an automated post-release CI step to submit/update NVDA’s manifest in the WinGet Community Repository using wingetcreate, reducing lag between GitHub releases and WinGet availability.

Changes:

  • Introduces a new submit-winget job that runs after the release job on release-* tags.
  • Fetches the published installer URL from the GitHub release and runs wingetcreate update ... --submit using a repository secret token.

Comment thread .github/workflows/testAndPublish.yml Outdated
Comment thread .github/workflows/testAndPublish.yml Outdated

@LeonarddeR LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As the current maintainer of the NVDA WinGet submission, I"m happy to get this upstreamed. Note that the current submission flow is stored here.
I'm using the current approach to install winget-create

      - name: Install Winget PowerShell
        run:           Install-PSResource Microsoft.WinGet.Client   -TrustRepository
      - name: Install wingetcreate
        run: Install-WinGetPackage -Id Microsoft.Wingetcreate

That said, that's because I"m performing some extra validation before submitting.

Also note that my flow runs once every two hours, so the current pull request against the winget repo is no later than two hours after the new release is advertised using the update check mechanism.

And as a last point of consideration, I think that it makes sense that there's a human that can control the winget pull request, especially when the winget maintainers are asking author feedback.

@seanbudd

Copy link
Copy Markdown
Member

Thanks for this PR - can you make sure to update the CI readme too?

@mdanish-kh

Copy link
Copy Markdown
Contributor Author

I'm using the current approach to install winget-create

I see, generally you don't need the PowerShell module in a CI environment to install wingetcreate since the team has made it directly available via these short URLs

I think that it makes sense that there's a human that can control the winget pull request

I agree, ideally someone should be able to control the bot account if we're automating it and make changes if necessary. Although if we agree on the base manifest already on winget-pkgs, then the changes should only be minimal for the new version (new InstallerUrl, new hash) and rest of the metadata should remain same. The goal is to have minimal feedback loop and get the PR merged as soon as possible, and being done through an official mechanism can help WinGet maintainers speed up the loop.

@mdanish-kh

Copy link
Copy Markdown
Contributor Author

@seanbudd The README should be updated. Let me know if I missed anything in it though

@LeonarddeR

Copy link
Copy Markdown
Collaborator

I see, generally you don't need the PowerShell module in a CI environment to install wingetcreate since the team has made it directly available via these short URLs

This is helpful! Even better micht be using choco install -y wingetcreate. Not that I don't trust Microsoft's URLs, but it makes sense to use an uniform pattern to install dependencies. We're also using it for other tools in the workflow.

I agree, ideally someone should be able to control the bot account if we're automating it and make changes if necessary.

I think it can be left up to the bot if the following happens:

  1. @nvaccessAuto creates the pr (the token used by winget-create should be from that user)
  2. NV Access organisation members get full access on the winget-pkgs fork on @nvaccessAuto
  3. If members want to close the pr, they can just remove the branches from the fork. Github will close the pr automatically.

Ideally, winget-create allowed us to choose our own fork. In that case, I believe that a fork owner can also control the pr through Github's interface. See microsoft/winget-create#470

Comment thread ci/README.md
@mdanish-kh

Copy link
Copy Markdown
Contributor Author

Even better micht be using choco install -y wingetcreate

@LeonarddeR aka.ms/wingetcreate/latest is updated as part of release process of winget-create so it's always pointing to the latest. If choco update process is swift and would always point to the latest version, then it should be fine

Ideally, winget-create allowed us to choose our own fork. In that case, I believe that a fork owner can also control the pr through Github's interface.

I didn't quite get that, could you please explain a bit more? Usually, the fork is created under the user account whose token is used. For submitting to a different repo, you can configure the WindowsPackageManagerRepository setting using wingetcreate settings command. winget-create doesn't have support yet for a --repo param so the settings file need to be updated first if we're doing it in a CI environment.

The other 1,2,3, steps that you mentioned seem right to me

@XLTechie XLTechie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving the CI readme change.

Shouldn't this have a changes.md entry? The fact that this is becoming part of the official build process should be advertised to those who might care, and promoting that Winget includes NVDA latest is good marketing.

@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label May 4, 2026
Comment thread .github/workflows/testAndPublish.yml Outdated
@seanbudd seanbudd added this to the 2026.3 milestone May 11, 2026
Comment thread .github/workflows/testAndPublish.yml Outdated
@seanbudd seanbudd marked this pull request as draft May 15, 2026 02:39
Move script to a separate .ps1 file & use WinGet to install wingetcreate
@mdanish-kh

Copy link
Copy Markdown
Contributor Author

@seanbudd Moving this to "Ready for review" since I was able to get back to your feedback. Feel free to move it back to draft if you marked it for another reason

@mdanish-kh mdanish-kh marked this pull request as ready for review May 27, 2026 04:08
Comment thread ci/README.md
Comment thread .github/workflows/testAndPublish.yml Outdated
Comment thread ci/scripts/submitWinGet.ps1
Comment thread .github/workflows/testAndPublish.yml Outdated
@seanbudd seanbudd requested a review from Qchristensen May 28, 2026 05:33
mdanish-kh and others added 2 commits May 28, 2026 13:11
Co-authored-by: Leonard de Ruijter <3049216+LeonarddeR@users.noreply.github.com>
@mdanish-kh mdanish-kh requested a review from a team as a code owner June 1, 2026 14:10
Comment thread user_docs/en/userGuide.md Outdated

@Qchristensen Qchristensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All reads well. Since this section is on Downloading NVDA, I added a link to the main download page (If people read this section and aren't sure, they should go there. If they read it and know what WinGet is and want to use that, the details are there for them).

Comment thread user_docs/en/userGuide.md Outdated
Comment thread user_docs/en/userGuide.md
Comment thread user_docs/en/userGuide.md Outdated
mdanish-kh and others added 2 commits June 3, 2026 10:49
Co-authored-by: Quentin Christensen <quentin@nvaccess.org>
Comment thread user_docs/en/userGuide.md Outdated
@seanbudd seanbudd enabled auto-merge (squash) June 3, 2026 05:53
@seanbudd seanbudd disabled auto-merge June 3, 2026 06:50
@seanbudd seanbudd merged commit 899d867 into nvaccess:master Jun 3, 2026
43 checks passed
@seanbudd

seanbudd commented Jun 3, 2026

Copy link
Copy Markdown
Member

Thanks @mdanish-kh

@LeonarddeR - I think 2026.3 will be the first beta series for us to publish - is there anything we need to do to handle switch over?

@LeonarddeR

Copy link
Copy Markdown
Collaborator

I think I will have to disable my automatic workflow re the NVDA packages when beta versions start to land. That said, the pull request for a new beta will be filed against winget earlier than my flow kicks in, and my flow checks for open pull requests, so it won't create a duplicate.
Better safe than sorry though.
Feel free to poke me in LeonarddeR/AutomaticWingetPackages#2 when I can merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Official and documented winget publishing

8 participants