Add token in winget action

This commit is contained in:
Pavel Djundik
2025-03-24 10:42:59 +02:00
committed by GitHub
parent 401d086191
commit 4896ac0788

View File

@@ -14,7 +14,11 @@ jobs:
run: |
$wingetPackage = "SteamRE.DepotDownloader"
$github = Invoke-RestMethod -uri "https://api.github.com/repos/SteamRE/DepotDownloader/releases"
$headers = @{
Authorization = "Bearer ${{ secrets.GITHUB_TOKEN }}"
}
$github = Invoke-RestMethod -uri "https://api.github.com/repos/SteamRE/DepotDownloader/releases" -Headers $headers
$targetRelease = $github | Where-Object -Property name -match '^DepotDownloader' | Select -First 1
$assets = $targetRelease | Select -ExpandProperty assets -First 1