From 757c540224c161713de7cab013ec6a6499148a96 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 6 Oct 2026 13:47:09 +0200 Subject: [PATCH] build: expose mpv version from reusable build workflows to release A reusable workflow only exposes top-level workflow_call outputs to the caller; job outputs are not visible. release.yml read the version from the build jobs' outputs, which is empty when called via workflow_call, so the publish job failed with 'mpv version not set' and the v0.41.0 release was never published. Each build-* workflow now exposes the version as a workflow_call output, and release.yml reads it from needs..outputs.version instead of the nested needs...outputs.version path. --- .github/workflows/build-linux.yml | 7 +++++++ .github/workflows/build-macos.yml | 7 +++++++ .github/workflows/build-windows.yml | 7 +++++++ .github/workflows/release.yml | 8 +++++--- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 00ecb65..2d7053e 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -25,6 +25,13 @@ on: pull_request: workflow_dispatch: workflow_call: + # A called (reusable) workflow only exposes top-level `workflow_call` + # outputs to the caller - job outputs are not. release.yml needs the + # mpv version to name the release assets, so expose it here. + outputs: + version: + description: mpv version the built artifact was compiled from + value: ${{ jobs.linux.outputs.version }} env: TARGET: x86_64-linux diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 4ce2e4f..af820ac 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -22,6 +22,13 @@ on: pull_request: workflow_dispatch: workflow_call: + # A called (reusable) workflow only exposes top-level `workflow_call` + # outputs to the caller - job outputs are not. release.yml needs the + # mpv version to name the release assets, so expose it here. + outputs: + version: + description: mpv version the built artifact was compiled from + value: ${{ jobs.macos.outputs.version }} jobs: macos: diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index ca17d4f..c36414e 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -17,6 +17,13 @@ on: pull_request: workflow_dispatch: workflow_call: + # A called (reusable) workflow only exposes top-level `workflow_call` + # outputs to the caller - job outputs are not. release.yml needs the + # mpv version to name the release assets, so expose it here. + outputs: + version: + description: mpv version the built artifact was compiled from + value: ${{ jobs.windows.outputs.version }} env: TARGET: x86_64-w64-mingw32 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d9b0db..1763cbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,9 +49,11 @@ jobs: - name: Assemble bare release assets run: | - # Reusable workflows expose their called job's outputs nested under - # the job name used in the called file (here: "linux"). - VER="${{ needs.build-linux.linux.outputs.version }}" + # The mpv version comes from each build workflow's top-level + # workflow_call output (a reusable workflow exposes only those to + # the caller, not its job outputs). All three build the same + # pinned mpv, so any one of them yields the version. + VER="${{ needs.build-linux.outputs.version }}" [ -n "$VER" ] || { echo "ERROR: mpv version not set"; exit 1; } mkdir -p release # linux: single self-contained libmpv.so