From 920f724dbd4a30e2268750fde18c6a236f4ef5c2 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Tue, 14 Apr 2026 22:48:08 +0200 Subject: [PATCH] fix: find libmpv asset by name pattern instead of constructing URL Asset filenames include a git hash that can't be predicted from the tag alone. Use the API assets list to find the correct download URL. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e43e6ea..c06dfa4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,11 +36,9 @@ jobs: - name: Fetch libmpv shell: pwsh run: | - $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 + $release = Invoke-RestMethod "https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/releases/latest" + $asset = $release.assets | Where-Object { $_.name -like "mpv-dev-x86_64-v3-*" } | Select-Object -First 1 + Invoke-WebRequest $asset.browser_download_url -OutFile mpv-dev.7z 7z x mpv-dev.7z -ompv-dev Copy-Item mpv-dev\libmpv-2.dll .