Generate Cache #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Cache | |
on: | |
workflow_dispatch: | |
jobs: | |
generate_jellyfin_cache: | |
name: Generate Jellyfin Cache | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# with: | |
# submodules: recursive | |
- name: Builder Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.local/share/flatpak | |
.flatpak-builder | |
key: flatpak-x86_64-${{ github.sha }} | |
restore-keys: | | |
flatpak | |
- name: Setup Dependencies | |
run: | | |
sudo apt update -y | |
sudo apt install flatpak -y | |
sudo su $(whoami) -c ' | |
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
flatpak install flathub org.flatpak.Builder -y | |
' | |
- name: Clone flatpak tools | |
run: | | |
git clone --depth 1 https://github.com/flatpak/flatpak-builder-tools.git | |
- name: Generate cache for NuGet | |
run: | | |
sudo su $(whoami) -c 'flatpak install flathub org.freedesktop.Sdk//23.08 org.freedesktop.Sdk.Extension.dotnet8//23.08 -y' | |
# v10.9.1 | |
git clone --depth 1 -b v10.9.1 https://github.com/jellyfin/jellyfin.git | |
./flatpak-builder-tools/dotnet/flatpak-dotnet-generator.py --runtime=linux-x64 nuget-generated-sources-x64.json jellyfin/Jellyfin.Server/Jellyfin.Server.csproj | |
./flatpak-builder-tools/dotnet/flatpak-dotnet-generator.py --runtime=linux-arm64 nuget-generated-sources-arm64.json jellyfin/Jellyfin.Server/Jellyfin.Server.csproj | |
- name: Generate cache for npm | |
run: | | |
# v10.9.1 | |
git clone --depth 1 -b v10.9.1 https://github.com/jellyfin/jellyfin-web.git | |
pip install ./flatpak-builder-tools/node | |
flatpak-node-generator -o npm-generated-sources.json npm jellyfin-web/package-lock.json | |
- name: Move Artifacts for Upload | |
run: | | |
mkdir artifacts | |
mv nuget-generated-sources-x64.json artifacts/ | |
mv nuget-generated-sources-arm64.json artifacts/ | |
mv npm-generated-sources.json artifacts/ | |
- name: Upload Flatpak Cache Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: flatpak-cache | |
path: artifacts |