From 94ea4c63cad23ad758abc5ef8ff2a9d3e175d214 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Tue, 14 Apr 2026 22:45:44 +0200 Subject: [PATCH] fix: use GitHub API to fetch latest libmpv tag instead of redirect Invoke-WebRequest fails on 302 redirects in newer PowerShell. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2eb89cd..e43e6ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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