Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/testAndPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -753,3 +753,38 @@ jobs:
--repo ${{ github.repository }} \
--clobber \
$NVDA_EXE_NAME#Installer

submit-winget:
name: Submit manifest to WinGet Packages Repository
needs: [release]
runs-on: windows-latest
Comment thread
seanbudd marked this conversation as resolved.
if: startsWith(github.ref_name, 'release-')
permissions:
contents: read
steps:
- name: Submit package using wingetcreate
env:
GH_TOKEN: ${{ github.token }}
# wingetcreate will read the token from the below environment variable
# Reference: https://aka.ms/winget-create-token
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_CREATE_GITHUB_TOKEN }}
run: |
# Strip the 'release-' prefix to get the package version
$packageVersion = "${{ github.ref_name }}" -replace '^release-', ''

# beta/rc tags submit to NVAccess.NVDA.Beta; all other release tags submit to NVAccess.NVDA
$isBeta = "${{ github.ref_name }}" -match 'beta|rc'
$wingetPackageId = if ($isBeta) { "NVAccess.NVDA.Beta" } else { "NVAccess.NVDA" }
Comment on lines +775 to +777
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.

Is it possible to have separate channels for RC and beta?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@seanbudd I was following the existing pattern for publishing RC under Beta, but I think it makes sense to have a separate RC PackageIdentifier. I've opened PRs for it on the WinGet repo. I'll re-test the wingetcreate flow and update the script once the PRs are merged & published. FYI @LeonarddeR

Moving the latest one should unblock us right away. I'll open PRs later to move the older RC ones


# Retrieve the .exe installer URL from the published GitHub release
$releaseAssets = gh release view "${{ github.ref_name }}" `
--repo "${{ github.repository }}" `
--json assets | ConvertFrom-Json
$installerUrl = ($releaseAssets.assets | Where-Object { $_.name -like "*.exe" }).url

# Download wingetcreate and open a PR against the winget-pkgs repository
curl.exe -JLO https://aka.ms/wingetcreate/latest
.\wingetcreate.exe update $wingetPackageId `
Comment on lines +785 to +787
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

This step downloads and executes wingetcreate.exe directly from the network without pinning a specific version or performing any integrity verification. To reduce supply-chain risk and improve reproducibility, consider pinning to a known release version and verifying its checksum/signature (or using a trusted distribution mechanism) before executing it.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

(or using a trusted distribution mechanism)

aka.ms is a trusted Microsoft domain.

If it's not a maintenance burden, one can pin to a specific wingetcreate release. The latest release will always generate the manifest with the latest (& non-deprecated) WinGet schema version.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The wingetcreate releases at GitHub do include a SHA256, but pinning to a specific version puts the burden on maintainers to update to a newer version when it's released. Otherwise, there is a risk of an "older" schema version being used to submit the PR which will eventually be deprecated for use at the WinGet Community Repository.

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.

why not just winget install wingetcreate?

--version $packageVersion `
--urls $installerUrl `
--submit
11 changes: 11 additions & 0 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Some of these steps run concurrently.
* On snapshot builds, deploy to the server.
* On beta branch builds, upload translation to Crowdin.
* On release builds, publish the release on GitHub and deploy to the server.
* On release builds, submit a PR for the new version to the WinGet community repository.
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.

Please also document the setup required for this to happen further down. We try to document all steps needed to get the CI working.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@seanbudd done, please check. I'm happy to follow up if I missed anything

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.

thanks looks good to me. I'll leave this unresolved until I set up the required tokens and confirm the steps are accurate

* Clean up build cache.

### Build behaviours
Expand Down Expand Up @@ -182,6 +183,16 @@ To ensure this step of tagged builds succeeds, set:

* `VT_API_KEY` as a secret.

### WinGet manifest submission

On release builds, a PR is automatically submitted to the [WinGet community repository](https://github.com/microsoft/winget-pkgs) with the new version's manifest.

To ensure this step of release builds succeeds, set:

* `WINGET_CREATE_GITHUB_TOKEN` as a secret with a GitHub personal access token that has permission to fork and open pull requests against `microsoft/winget-pkgs`.

See [the winget-create documentation](https://aka.ms/winget-create-token) for the required token scopes.

### GitHub Discussions category

This is only used when building tagged builds.
Expand Down
Loading