Skip to content

Commit ad14922

Browse files
authored
build: update WinGet publish script to use env var instead of --token (#19021)
With the latest winget-create release, the preferred method for providing the GitHub token in CI/CD environment is via the environment variable `WINGET_CREATE_GITHUB_TOKEN`. Removed use of `--token` and switched to environment variable. See https://aka.ms/winget-create-token for details.
1 parent 557a193 commit ad14922

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/winget.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66

77
env:
88
REGEX: 'Microsoft\.WindowsTerminal(?:Preview)?_([\d.]+)_8wekyb3d8bbwe\.msixbundle$'
9+
# winget-create will read the following environment variable to access the GitHub token needed for submitting a PR
10+
# See https://aka.ms/winget-create-token
11+
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_TOKEN }}
912

1013
jobs:
1114
publish:
@@ -21,4 +24,4 @@ jobs:
2124
$wingetPackage = "Microsoft.WindowsTerminal${{ github.event.release.prerelease && '.Preview' || '' }}"
2225
2326
& curl.exe -JLO https://aka.ms/wingetcreate/latest
24-
& .\wingetcreate.exe update $wingetPackage -s -v $version -u $wingetRelevantAsset.browser_download_url -t "${{ secrets.WINGET_TOKEN }}"
27+
& .\wingetcreate.exe update $wingetPackage -s -v $version -u $wingetRelevantAsset.browser_download_url

0 commit comments

Comments
 (0)