fix: use GitHub API to fetch latest libmpv tag instead of redirect
Build & Release / windows (push) Has been cancelled
Build & Release / macos (push) Has been cancelled
Build & Release / release (push) Has been cancelled

Invoke-WebRequest fails on 302 redirects in newer PowerShell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-14 22:45:44 +02:00
parent 653e4a5e13
commit 94ea4c63ca
+3 -3
View File
@@ -36,9 +36,9 @@ jobs:
- name: Fetch libmpv
shell: pwsh
run: |
$mpvUrl = "https://github.com/shinchiro/mpv-winbuild-cmake/releases/latest"
$release = Invoke-WebRequest $mpvUrl -MaximumRedirection 0 -ErrorAction SilentlyContinue
$tag = ($release.Headers.Location -split '/')[-1]
$apiUrl = "https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/releases/latest"
$release = Invoke-RestMethod $apiUrl
$tag = $release.tag_name
$dlUrl = "https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/$tag/mpv-dev-x86_64-v3-${tag}.7z"
Invoke-WebRequest $dlUrl -OutFile mpv-dev.7z
7z x mpv-dev.7z -ompv-dev