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