From e33b578633cb8b8d4657dc2f89034289265a8715 Mon Sep 17 00:00:00 2001 From: Muhammad Danish Date: Wed, 12 Aug 2026 17:17:06 +0500 Subject: [PATCH 1/2] Update WinGet workflow to remove inline `--token` usage --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f71296d..3828800 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -211,6 +211,10 @@ jobs: gh repo sync "$forkOwner/winget-pkgs" --source microsoft/winget-pkgs - name: Submit package using wingetcreate + # 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_GITHUB_TOKEN }} run: | $packageVersion = "${{ github.ref }}" -replace 'refs/tags/v', '' $installerUrl = "https://github.com/httptoolkit/httptoolkit-desktop/releases/download/v$packageVersion/HttpToolkit-$packageVersion.exe" @@ -220,5 +224,4 @@ jobs: .\wingetcreate.exe update HTTPToolKit.HTTPToolKit ` --version $packageVersion ` --urls "$installerUrl|x64" ` - --submit ` - --token "${{ secrets.WINGET_GITHUB_TOKEN }}" + --submit From 9b954538fbf027d6ccb2894043354bb3a1b96fa2 Mon Sep 17 00:00:00 2001 From: Muhammad Danish <88161975+mdanish-kh@users.noreply.github.com> Date: Wed, 12 Aug 2026 17:24:04 +0500 Subject: [PATCH 2/2] use curl as it's faster --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3828800..9262aed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -220,7 +220,7 @@ jobs: $installerUrl = "https://github.com/httptoolkit/httptoolkit-desktop/releases/download/v$packageVersion/HttpToolkit-$packageVersion.exe" # Update package using wingetcreate - Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe + curl.exe -JLO https://aka.ms/wingetcreate/latest .\wingetcreate.exe update HTTPToolKit.HTTPToolKit ` --version $packageVersion ` --urls "$installerUrl|x64" `