mirror of
https://github.com/kirbylink/mpv-natives
synced 2026-11-18 21:09:01 +01:00
Merge pull request #7 from kirbylink/fix/release-workflow-outputs
build: expose mpv version from reusable build workflows to release
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user