Skip to content

Bump to v1.1.0

Bump to v1.1.0 #19

Workflow file for this run

name: Build Plugin
on:
push:
branches: [main, master]
tags: ['v*']
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore Jellyfin.Plugin.DynamicLibrary/Jellyfin.Plugin.DynamicLibrary.csproj
- name: Build
run: dotnet build Jellyfin.Plugin.DynamicLibrary/Jellyfin.Plugin.DynamicLibrary.csproj -c Release --no-restore
- name: Create plugin package
run: |
# Use tag version for releases, csproj version otherwise
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
VERSION="${GITHUB_REF#refs/tags/v}"
else
VERSION=$(grep -oPm1 "(?<=<Version>)[^<]+" Jellyfin.Plugin.DynamicLibrary/Jellyfin.Plugin.DynamicLibrary.csproj)
fi
echo "VERSION=${VERSION}" >> $GITHUB_ENV
mkdir -p artifacts/DynamicLibrary
cp Jellyfin.Plugin.DynamicLibrary/bin/Release/net9.0/Jellyfin.Plugin.DynamicLibrary.dll artifacts/DynamicLibrary/
# Create meta.json
cat > artifacts/DynamicLibrary/meta.json << EOF
{
"guid": "bc6b8d94-3800-4ab9-8f61-cf26ca1ab98c",
"name": "Dynamic Library",
"description": "Browse and stream movies, TV shows, and anime from TMDB and TVDB without local media files. Supports direct URL streaming and watch progress tracking.",
"overview": "Browse and stream content from TMDB/TVDB without local files",
"owner": "pythcon",
"category": "Metadata",
"version": "${VERSION}.0",
"targetAbi": "10.11.0.0",
"status": "Active"
}
EOF
# Create ZIP
cd artifacts
zip -r dynamic-library-${VERSION}.zip DynamicLibrary/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dynamic-library
path: artifacts/dynamic-library-*.zip
- name: Create Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: artifacts/dynamic-library-*.zip
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-manifest:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dynamic-library
- name: Calculate checksum and update manifest
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
CHECKSUM=$(md5sum dynamic-library-${VERSION}.zip | cut -d ' ' -f 1)
# Create new version entry
NEW_VERSION=$(jq -n \
--arg version "${VERSION}.0" \
--arg changelog "See GitHub releases for changelog" \
--arg targetAbi "10.11.0.0" \
--arg sourceUrl "https://github.com/pythcon/jellyfin-dynamic-library/releases/download/v${VERSION}/dynamic-library-${VERSION}.zip" \
--arg checksum "${CHECKSUM}" \
--arg timestamp "${TIMESTAMP}" \
'{
version: $version,
changelog: $changelog,
targetAbi: $targetAbi,
sourceUrl: $sourceUrl,
checksum: $checksum,
timestamp: $timestamp
}')
# Check if manifest exists and has versions
if [ -f manifest.json ] && jq -e '.[0].versions' manifest.json > /dev/null 2>&1; then
# Prepend new version to existing versions array (newer versions first)
jq --argjson newVersion "$NEW_VERSION" \
'.[0].versions = [$newVersion] + [.[0].versions[] | select(.version != $newVersion.version)]' \
manifest.json > manifest.tmp && mv manifest.tmp manifest.json
else
# Create new manifest from scratch
jq -n --argjson newVersion "$NEW_VERSION" \
'[{
guid: "bc6b8d94-3800-4ab9-8f61-cf26ca1ab98c",
name: "Dynamic Library",
description: "Browse and stream movies, TV shows, and anime from TMDB and TVDB without local media files. Supports direct URL streaming and watch progress tracking.",
overview: "Browse and stream content from TMDB/TVDB without local files",
owner: "pythcon",
category: "Metadata",
imageUrl: "https://pythcon.github.io/jellyfin-dynamic-library/DynamicLibrary.png",
versions: [$newVersion]
}]' > manifest.json
fi
- name: Commit and push manifest
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add manifest.json
git commit -m "Update manifest for ${GITHUB_REF#refs/tags/}" || echo "No changes to commit"
git push