Files
mpv-natives/.github/workflows/release.yml
T
david 4a0f1686b5 refactor: build libmpv on the LGPL license path
mpv is dual-licensed (LGPL-2.1+/GPL-2+). We build it with -Dgpl=false
and FFmpeg without --enable-gpl (every enabled feature - mjpeg/png
encoders, spdif muxer, libdav1d, all decoders - is LGPL-available), so
the resulting library is LGPL-2.1-or-later instead of GPL. That is the
license path applications embedding libmpv in-process (via JNA, as
jlibmpv does) need, since a GPL build's copyleft obligations would
reach into them.

Also ship a LICENSE-NOTICE.txt with each release and fix the release
workflow's reference to the reusable workflows' job outputs (needs.<id>.
<jobname>.outputs). Docs: README license section now states the LGPL
position explicitly.
2026-10-02 19:59:21 +02:00

78 lines
2.7 KiB
YAML

name: release
# Publishes the self-contained libmpv for all three platforms as a GitHub
# Release. Triggered by pushing a tag of the form v<mpv-version> (e.g.
# v0.41.0). It reuses the three per-platform build workflows and re-uploads
# their single-file artifacts as bare release assets plus a combined
# checksums.txt.
#
# Asset names are derived from each build job's output and the mpv version
# read from the mpv source tree, so the release tag and the mpv version stay
# in sync:
# mpv-natives-linux-x86_64-<ver>.so
# mpv-natives-windows-x86_64-<ver>.dll
# mpv-natives-macos-universal-<ver>.dylib
# LICENSE-NOTICE.txt
# checksums.txt
#
# jlibmpv's RemoteNativeLocator resolves the download URL deterministically
# from (platform, mpv version) against these names.
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
build-linux:
uses: ./.github/workflows/build-linux.yml
build-windows:
uses: ./.github/workflows/build-windows.yml
build-macos:
uses: ./.github/workflows/build-macos.yml
publish:
needs: [build-linux, build-windows, build-macos]
runs-on: ubuntu-24.04
steps:
- name: Download platform artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Check out mpv-natives (for LICENSE-NOTICE.txt)
uses: actions/checkout@v4
with:
fetch-depth: 1
- 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 }}"
[ -n "$VER" ] || { echo "ERROR: mpv version not set"; exit 1; }
mkdir -p release
# linux: single self-contained libmpv.so
cp "artifacts/mpv-natives-linux-x86_64/libmpv.so" \
"release/mpv-natives-linux-x86_64-${VER}.so"
# windows: single self-contained libmpv-*.dll (static CRT, no closure)
cp artifacts/mpv-natives-windows-x86_64/libmpv-*.dll \
"release/mpv-natives-windows-x86_64-${VER}.dll"
# macos: single universal libmpv.dylib
cp "artifacts/mpv-natives-macos-universal/libmpv.dylib" \
"release/mpv-natives-macos-universal-${VER}.dylib"
cp LICENSE-NOTICE.txt release/
(cd release && sha256sum * > checksums.txt)
echo "=== release assets ==="
ls -l release
echo "=== checksums ==="
cat release/checksums.txt
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
files: release/*
generate_release_notes: false