Skip to content

Commit 6cba11d

Browse files
authored
Merge pull request #139 from mdanish-kh/patch-1
Update WinGet workflow to remove inline `--token` usage
2 parents cef4eb6 + 9b95453 commit 6cba11d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,17 @@ jobs:
211211
gh repo sync "$forkOwner/winget-pkgs" --source microsoft/winget-pkgs
212212
213213
- name: Submit package using wingetcreate
214+
# winget-create will read the following environment variable to access the GitHub token needed for submitting a PR
215+
# See https://aka.ms/winget-create-token
216+
env:
217+
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_GITHUB_TOKEN }}
214218
run: |
215219
$packageVersion = "${{ github.ref }}" -replace 'refs/tags/v', ''
216220
$installerUrl = "https://github.com/httptoolkit/httptoolkit-desktop/releases/download/v$packageVersion/HttpToolkit-$packageVersion.exe"
217221
218222
# Update package using wingetcreate
219-
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
223+
curl.exe -JLO https://aka.ms/wingetcreate/latest
220224
.\wingetcreate.exe update HTTPToolKit.HTTPToolKit `
221225
--version $packageVersion `
222226
--urls "$installerUrl|x64" `
223-
--submit `
224-
--token "${{ secrets.WINGET_GITHUB_TOKEN }}"
227+
--submit

0 commit comments

Comments
 (0)