Skip to content

Commit 86fac5c

Browse files
Add Windows installer build steps
Avoids the need to run this separately afterwards; it will be run automatically on all stable releases.
1 parent f1efc37 commit 86fac5c

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

.github/workflows/release-build.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,93 @@ jobs:
408408
sudo ln -sf ${BASEDIR}/${{ env.JELLYFIN_RELEASE_TYPE }}/${{ env.JELLYFIN_VERSION }} ${BASEDIR}/latest || exit 1
409409
fi
410410
411+
- name: "Store artifact for next build"
412+
uses: actions/upload-artifact@v4
413+
with:
414+
name: windows-x64
415+
retention-days: 1
416+
if-no-files-found: error
417+
path: out/windows/jellyfin_*-amd64.zip
418+
419+
WindowsInstaller:
420+
needs: Windows
421+
runs-on: windows-latest
422+
strategy:
423+
fail-fast: false
424+
matrix:
425+
arch:
426+
- amd64
427+
env:
428+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
429+
if: startsWith(inputs.jellyfin_version, 'v')
430+
steps:
431+
- name: "Fetch artifact from previous build"
432+
uses: actions/download-artifact@v4
433+
working-directory: ./jellyfin-server-windows
434+
with:
435+
name: windows-x64
436+
437+
- name: "Clone UX repository"
438+
uses: actions/checkout@v4
439+
working-directory: ./jellyfin-server-windows
440+
with:
441+
repository: jellyfin/jellyfin-ux
442+
path: .\jellyfin-ux
443+
444+
- name: "Extract Jellyfin server archive"
445+
working-directory: ./jellyfin-server-windows
446+
run: |
447+
Expand-Archive 'jellyfin_*-amd64.zip'
448+
Copy-Item ".\nssm\nssm.exe" -Destination $(Resolve-Path .\jellyfin\jellyfin)
449+
450+
- name: "Add NSSM"
451+
working-directory: ./jellyfin-server-windows
452+
run: |
453+
Invoke-WebRequest 'https://repo.jellyfin.org/files/other/nssm.zip' -OutFile 'nssm.zip'
454+
Expand-Archive 'nssm.zip'
455+
Copy-Item ".\nssm\nssm.exe" -Destination $(Resolve-Path .\jellyfin\jellyfin)
456+
457+
- name: "Publish tray"
458+
working-directory: ./jellyfin-server-windows
459+
run: |
460+
New-Item -Path .\jellyfin\jellyfin\jellyfin-windows-tray -ItemType Directory
461+
dotnet publish -c Release -r win-x64 -f net472 --no-self-contained --output $(Resolve-Path .\jellyfin\jellyfin\jellyfin-windows-tray)
462+
463+
- name: "Build installer"
464+
working-directory: ./jellyfin-server-windows
465+
run: |
466+
$env:InstallLocation = $(Resolve-Path .\jellyfin\jellyfin)
467+
makensis /Dx64 /DUXPATH=$(Resolve-Path .\jellyfin-ux) $(Join-Path -Path $(Resolve-Path .\nsis) -ChildPath jellyfin.nsi)
468+
469+
- name: "Rename installer"
470+
working-directory: ./jellyfin-server-windows
471+
run: |
472+
cd .\nsis
473+
$version = "${{ inputs.jellyfin_version }}".Substring(1)
474+
Rename-Item -Path .\jellyfin_*_windows-x64.exe -NewName ("jellyfin_${version}_windows-x64.exe")
475+
476+
- name: "Upload artifacts to repository server"
477+
uses: appleboy/scp-action@917f8b81dfc1ccd331fef9e2d61bdc6c8be94634 # v0.1.7
478+
with:
479+
host: "${{ secrets.REPO_HOST }}"
480+
username: "${{ secrets.REPO_USER }}"
481+
key: "${{ secrets.REPO_KEY }}"
482+
source: "jellyfin-server-windows\jellyfin_*_windows-x64.exe"
483+
strip_components: 1
484+
target: "/srv/incoming/server/${{ inputs.jellyfin_version }}/windows/${{ matrix.arch }}"
485+
486+
- name: "Move artifacts into repository"
487+
uses: appleboy/ssh-action@7eaf76671a0d7eec5d98ee897acda4f968735a17 # v1.2.0
488+
with:
489+
host: "${{ secrets.REPO_HOST }}"
490+
username: "${{ secrets.REPO_USER }}"
491+
key: "${{ secrets.REPO_KEY }}"
492+
debug: false
493+
script_stop: true
494+
script: |
495+
export BASEDIR="/srv/repository/main/server/windows"
496+
sudo mv -t ${BASEDIR}/stable/${{ inputs.jellyfin_version }}/${{ matrix.arch }}/ /srv/incoming/server/${{ inputs.jellyfin_version }}/windows/${{ matrix.arch }}/jellyfin_*_windows-x64.exe || exit 1
497+
411498
MacOS:
412499
runs-on: ubuntu-24.04
413500
strategy:

0 commit comments

Comments
 (0)