Skip to content

Commit 1f8fe1c

Browse files
authored
build: update WinGet publish workflow to use env instead of --token (#467)
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 9d8eb8f commit 1f8fe1c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/winget.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ jobs:
1111
# winget-create is only supported on Windows
1212
runs-on: windows-latest
1313

14+
# winget-create will read the following environment variable to access the GitHub token needed for submitting a PR
15+
# See https://aka.ms/winget-create-token
16+
env:
17+
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_TOKEN }}
18+
1419
# Only submit stable releases
1520
if: ${{ !github.event.release.prerelease }}
1621
steps:
@@ -27,5 +32,4 @@ jobs:
2732
.\wingetcreate.exe update Microsoft.Edit `
2833
--version $packageVersion `
2934
--urls $x64InstallerUrl $arm64InstallerUrl `
30-
--token "${{ secrets.WINGET_TOKEN }}" `
3135
--submit

0 commit comments

Comments
 (0)