ci: use env var instead of passing winget token inline (#24387)

This commit is contained in:
Muhammad Danish
2026-04-29 06:50:14 +00:00
committed by GitHub
parent 76242f8202
commit f9068c2afa
+4 -3
View File
@@ -823,15 +823,16 @@ jobs:
.\wingetcreate.exe update Coder.Coder `
--submit `
--version "${version}" `
--urls "${amd64_installer_url}" "${amd64_zip_url}" "${arm64_zip_url}" `
--token "$env:WINGET_GH_TOKEN"
--urls "${amd64_installer_url}" "${amd64_zip_url}" "${arm64_zip_url}"
env:
# For gh CLI:
GH_TOKEN: ${{ github.token }}
# For wingetcreate. We need a real token since we're pushing a commit
# to GitHub and then making a PR in a different repo.
WINGET_GH_TOKEN: ${{ secrets.CDRCI_GITHUB_TOKEN }}
# wingetcreate will read the token from the environment variable defined below.
# Reference: https://aka.ms/winget-create-token
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.CDRCI_GITHUB_TOKEN }}
VERSION: ${{ needs.release.outputs.version }}
- name: Comment on PR