diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f71296d..9262aed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -211,14 +211,17 @@ 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" # 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" ` - --submit ` - --token "${{ secrets.WINGET_GITHUB_TOKEN }}" + --submit