Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

build

build #160

Workflow file for this run

name: build
on:
push:
branches:
- release
- prerelease
- test
workflow_dispatch:
inputs:
job:
description: 'Job to run (leave empty for all)'
required: false
type: choice
options:
- ''
- build-mac
- build-macarm64
- build-win64-legacy
- build-win64
- build-win32
- build-ubuntu
- build-debian
jobs:
build-mac:
if: inputs.job == '' || inputs.job == 'build-mac'
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
brew update
brew install ninja mpv qt@6 || true
- name: Release build
run: |
mkdir build
sed -i '' 's|await loadScript('\''qrc:///qtwebchannel/qwebchannel.js'\'');|document.body.style.overscrollBehavior = "none";&|g' native/nativeshell.js
cd build
cmake -GNinja -DQTROOT=/usr/local/opt/qt@6 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output -DCHECK_FOR_UPDATES=ON -DUSE_STATIC_MPVQT=ON ..
ninja install
- name: Sign and create dmg
run: |
codesign --force --deep -s - "./build/output/Jellyfin Desktop.app/"
brew install create-dmg
attempts=0
while [[ "$attempts" -lt 10 ]]
do
attempts=$((attempts+1))
create-dmg --volname "Jellyfin Desktop" --no-internet-enable "Jellyfin Desktop.dmg" "./build/output/Jellyfin Desktop.app" && break || echo "dmg create failed, retrying..."
sleep 5
done
if ! [[ -e "Jellyfin Desktop.dmg" ]]
then
echo "Failed to create dmg after 10 attempts"
exit 1
fi
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: macos
path: ${{ github.workspace }}/Jellyfin Desktop.dmg
build-macarm64:
if: inputs.job == '' || inputs.job == 'build-macarm64'
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
brew update
brew install ninja mpv qt@6 || true
- name: Release build
run: |
mkdir build
sed -i '' 's|await loadScript('\''qrc:///qtwebchannel/qwebchannel.js'\'');|document.body.style.overscrollBehavior = "none";&|g' native/nativeshell.js
cd build
cmake -GNinja -DQTROOT=/opt/homebrew/opt/qt@6 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=output -DCHECK_FOR_UPDATES=ON -DUSE_STATIC_MPVQT=ON ..
ninja install
- name: Sign and create dmg
run: |
codesign --force --deep -s - "./build/output/Jellyfin Desktop.app/"
brew install create-dmg
create-dmg --volname "Jellyfin Desktop" --no-internet-enable "Jellyfin Desktop.dmg" "./build/output/Jellyfin Desktop.app"
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: macos-arm64
path: ${{ github.workspace }}/Jellyfin Desktop.dmg
build-win64-legacy:
if: inputs.job == '' || inputs.job == 'build-win64-legacy'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Qt 6
uses: jurplel/install-qt-action@v3
with:
version: "6.8.0"
arch: "win64_msvc2019_64"
modules: "qtwebengine"
- name: Install dependencies
run: |
mkdir build
curl -L https://aka.ms/vs/17/release/vc_redist.x64.exe > vc_redist.x64.exe
sed -i 's#C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Redist\\MSVC\\v142\\vcredist_x64.exe#'"$(readlink -f vc_redist.x64.exe | sed 's#/\([a-z]\)/#\1:\\#g' | tr '/' '\\' | sed 's/\\/\\\\/g')#g" bundle/win/Bundle.wxs
curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip
unzip ninja.zip
mv ninja.exe build/
curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-v3-20240414-git-6a8b130.7z/download > mpv.7z
7z x mpv.7z
mkdir mpv
mv include mpv
gendef libmpv-2.dll
mv libmpv-2.dll mpv/libmpv-2.dll
mv libmpv-2.def mpv.def
mv mpv.def libmpv.dll.a mpv/
mv mpv build/
shell: bash
- name: Build
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cd build
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt6_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCHECK_FOR_UPDATES=ON -DUSE_STATIC_MPVQT=ON ..
lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X64
ninja
ninja windows_package
shell: cmd
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: windows-legacy64
path: ${{ github.workspace }}/build/JellyfinDesktop-*.exe
build-win64:
if: inputs.job == '' || inputs.job == 'build-win64'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Qt 6
uses: jurplel/install-qt-action@v4
with:
version: "6.8.0"
arch: "win64_msvc2019_64"
modules: "qtwebengine"
- name: Install dependencies
run: |
mkdir build
curl -L https://aka.ms/vs/17/release/vc_redist.x64.exe > vc_redist.x64.exe
sed -i 's#C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Redist\\MSVC\\v142\\vcredist_x64.exe#'"$(readlink -f vc_redist.x64.exe | sed 's#/\([a-z]\)/#\1:\\#g' | tr '/' '\\' | sed 's/\\/\\\\/g')#g" bundle/win/Bundle.wxs
curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip
unzip ninja.zip
mv ninja.exe build/
curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-x86_64-v3-20240304-git-9ac791c.7z/download > mpv.7z
7z x mpv.7z
mkdir mpv
mv include mpv
gendef libmpv-2.dll
mv libmpv-2.dll mpv/libmpv-2.dll
mv libmpv-2.def mpv.def
mv mpv.def libmpv.dll.a mpv/
mv mpv build/
shell: bash
- name: Build
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cd build
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt6_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCHECK_FOR_UPDATES=ON -DUSE_STATIC_MPVQT=ON ..
lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X64
ninja
ninja windows_package
shell: cmd
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: windows
path: ${{ github.workspace }}/build/JellyfinDesktop-*.exe
build-win32:
if: inputs.job == '' || inputs.job == 'build-win32'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Qt 6
uses: jurplel/install-qt-action@v4
with:
version: "6.8.0"
arch: "win32_msvc2019"
modules: "qtwebengine"
- name: Install dependencies
run: |
mkdir build
curl -L https://aka.ms/vs/17/release/vc_redist.x86.exe > vc_redist.x86.exe
sed -i 's#C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Redist\\MSVC\\v142\\vcredist_x64.exe#'"$(readlink -f vc_redist.x86.exe | sed 's#/\([a-z]\)/#\1:\\#g' | tr '/' '\\' | sed 's/\\/\\\\/g')#g" bundle/win/Bundle.wxs
curl -L https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip > ninja.zip
unzip ninja.zip
mv ninja.exe build/
curl -L https://sourceforge.net/projects/mpv-player-windows/files/libmpv/mpv-dev-i686-20240304-git-9ac791c.7z/download > mpv.7z
7z x mpv.7z
mkdir mpv
mv include mpv
gendef libmpv-2.dll
mv libmpv-2.dll mpv/libmpv-2.dll
mv libmpv-2.def mpv.def
mv mpv.def libmpv.dll.a mpv/
mv mpv build/
shell: bash
- name: Build
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
cd build
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin;%CD%
cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=output -DCMAKE_MAKE_PROGRAM=ninja.exe -DQTROOT=%Qt6_DIR% -DMPV_INCLUDE_DIR=mpv/include -DMPV_LIBRARY=mpv/libmpv-2.dll -DCHECK_FOR_UPDATES=ON -DUSE_STATIC_MPVQT=ON ..
lib /def:mpv\mpv.def /out:mpv\libmpv-2.dll.lib /MACHINE:X86
ninja
ninja windows_package
shell: cmd
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: windows-legacy32
path: ${{ github.workspace }}/build/JellyfinDesktop-*.exe
build-ubuntu:
if: inputs.job == '' || inputs.job == 'build-ubuntu'
strategy:
fail-fast: false
matrix:
tag: [plucky, oracular, noble, jammy]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes gnupg debsigs devscripts
- name: Docker Build
run: |
docker build -f deployment/Dockerfile.debian -t builddeb --build-arg TAG=${{ matrix.tag }} --build-arg IMG=ubuntu deployment
docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e TAG=${{ matrix.tag }} -e IMG=ubuntu builddeb
sudo chown --recursive $USER $(pwd)/deployment/dist
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: ubuntu-${{ matrix.tag }}
path: ${{ github.workspace }}/deployment/dist/*
- name: Import repository signing GPG key
run: |
echo -n "${{ secrets.DEBIAN_SIGNING_KEY }}" | base64 --decode | gpg --batch --yes --import
- name: Sign Debian package and source files
run: |
for file in deployment/dist/*.deb; do
debsigs --sign=origin --default-key=${{ secrets.DEBIAN_SIGNING_KEY_ID }} ${file}
done
debsign -k ${{ secrets.DEBIAN_SIGNING_KEY_ID }} deployment/dist/*.changes
- name: Remove repository signing GPG key
run: |
gpg --batch --yes --delete-secret-keys ${{ secrets.DEBIAN_SIGNING_KEY_ID }}
- name: Upload artifacts to repository server
uses: appleboy/scp-action@917f8b81dfc1ccd331fef9e2d61bdc6c8be94634 # v0.1.7
with:
host: "${{ secrets.REPO_HOST }}"
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
source: deployment/dist/*
strip_components: 2
target: "/srv/incoming/client/jellyfin-desktop/ubuntu/${{ matrix.tag }}"
- name: Import artifactsinto reprepro
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
with:
host: "${{ secrets.REPO_HOST }}"
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
debug: false
script_stop: false
script: |
set -o xtrace
COMPONENT="main"
sudo reprepro --waitforlock 30 --basedir /srv/ubuntu --component ${COMPONENT} includedeb ${{ matrix.tag }} /srv/incoming/client/jellyfin-desktop/ubuntu/${{ matrix.tag }}/*.deb || exit 1
sudo reprepro --waitforlock 30 --basedir /srv/ubuntu --component ${COMPONENT} includedsc ${{ matrix.tag }} /srv/incoming/client/jellyfin-desktop/ubuntu/${{ matrix.tag }}/*.dsc || exit 1
- name: Move artifacts into repository
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
with:
host: "${{ secrets.REPO_HOST }}"
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
debug: false
script_stop: false
script: |
export BASEDIR="/srv/repository/main/client/jellyfin-desktop/ubuntu"
sudo mkdir -p ${BASEDIR}/stable/${{ github.ref_name }} || exit 1
sudo mv -t ${BASEDIR}/stable/${{ github.ref_name }} /srv/incoming/client/jellyfin-desktop/ubuntu/${{ matrix.tag }}/* || exit 1
sudo rm ${BASEDIR}/latest || true
sudo ln -sf ${BASEDIR}/stable/${{ github.ref_name }} ${BASEDIR}/latest || exit 1
build-debian:
if: inputs.job == '' || inputs.job == 'build-debian'
strategy:
fail-fast: false
matrix:
tag: [bookworm, trixie]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes gnupg debsigs devscripts
- name: Docker Build
run: |
docker build -f deployment/Dockerfile.debian -t builddeb --build-arg TAG=${{ matrix.tag }} --build-arg IMG=debian deployment
docker run -v $(pwd)/deployment/dist:/dist -v $(pwd):/jellyfin -e TAG=${{ matrix.tag }} -e IMG=debian builddeb
sudo chown --recursive $USER $(pwd)/deployment/dist
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: debian-${{ matrix.tag }}
path: ${{ github.workspace }}/deployment/dist/*
- name: Import repository signing GPG key
run: |
echo -n "${{ secrets.DEBIAN_SIGNING_KEY }}" | base64 --decode | gpg --batch --yes --import
- name: Sign Debian package and source files
run: |
for file in deployment/dist/*.deb; do
debsigs --sign=origin --default-key=${{ secrets.DEBIAN_SIGNING_KEY_ID }} ${file}
done
debsign -k ${{ secrets.DEBIAN_SIGNING_KEY_ID }} deployment/dist/*.changes
- name: Remove repository signing GPG key
run: |
gpg --batch --yes --delete-secret-keys ${{ secrets.DEBIAN_SIGNING_KEY_ID }}
- name: Upload artifacts to repository server
uses: appleboy/scp-action@917f8b81dfc1ccd331fef9e2d61bdc6c8be94634 # v0.1.7
with:
host: "${{ secrets.REPO_HOST }}"
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
source: deployment/dist/*
strip_components: 2
target: "/srv/incoming/client/jellyfin-desktop/debian/${{ matrix.tag }}"
- name: Import artifactsinto reprepro
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
with:
host: "${{ secrets.REPO_HOST }}"
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
debug: false
script_stop: false
script: |
set -o xtrace
COMPONENT="main"
sudo reprepro --waitforlock 30 --basedir /srv/debian --component ${COMPONENT} includedeb ${{ matrix.tag }} /srv/incoming/client/jellyfin-desktop/debian/${{ matrix.tag }}/*.deb || exit 1
sudo reprepro --waitforlock 30 --basedir /srv/debian --component ${COMPONENT} includedsc ${{ matrix.tag }} /srv/incoming/client/jellyfin-desktop/debian/${{ matrix.tag }}/*.dsc || exit 1
- name: Move artifacts into repository
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
with:
host: "${{ secrets.REPO_HOST }}"
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
debug: false
script_stop: false
script: |
export BASEDIR="/srv/repository/main/client/jellyfin-desktop/debian"
sudo mkdir -p ${BASEDIR}/stable/${{ github.ref_name }} || exit 1
sudo mv -t ${BASEDIR}/stable/${{ github.ref_name }} /srv/incoming/client/jellyfin-desktop/debian/${{ matrix.tag }}/* || exit 1
sudo rm ${BASEDIR}/latest || true
sudo ln -sf ${BASEDIR}/stable/${{ github.ref_name }} ${BASEDIR}/latest || exit 1