-
-
Notifications
You must be signed in to change notification settings - Fork 770
Automate winget package submission #20029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
| 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" } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to have separate channels for RC and beta?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is done in 98a9379 |
||
|
|
||
| # 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
+786
to
+788
|
||
| --version $packageVersion ` | ||
| --urls $installerUrl ` | ||
| --submit | ||
Uh oh!
There was an error while loading. Please reload this page.