build: update WinGet publish workflow to use env instead of --token (#467)
Some checks failed
CI / check (ubuntu-latest) (push) Has been cancelled
CI / check (windows-latest) (push) Has been cancelled

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.
This commit is contained in:
Muhammad Danish 2025-06-12 02:26:27 +05:00 committed by GitHub
parent 9d8eb8fec8
commit 1f8fe1caee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,6 +11,11 @@ jobs:
# winget-create is only supported on Windows
runs-on: windows-latest
# winget-create will read the following environment variable to access the GitHub token needed for submitting a PR
# See https://aka.ms/winget-create-token
env:
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_TOKEN }}
# Only submit stable releases
if: ${{ !github.event.release.prerelease }}
steps:
@ -27,5 +32,4 @@ jobs:
.\wingetcreate.exe update Microsoft.Edit `
--version $packageVersion `
--urls $x64InstallerUrl $arm64InstallerUrl `
--token "${{ secrets.WINGET_TOKEN }}" `
--submit