Kodi service addon that detects HDR/SDR state of the currently playing video and notifies external services: - HyperHDR: toggles tone mapping via videomodehdr JSON-RPC command - Home Assistant: sends HDR state via webhook trigger Supports Kodi 20 (Nexus) and later. Both targets are independently configurable with host, port, SSL, and authentication settings. Includes GitHub Actions workflow to build installable ZIP packages on every push and publish them as release assets on tags.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: Build Kodi Addon
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
tags: ["v*"]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Extract version from addon.xml
|
||||
id: version
|
||||
run: |
|
||||
version=$(grep -oP 'version="\K[^"]+' service.video.hdrnotify/addon.xml | head -1)
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
echo "Addon version: $version"
|
||||
|
||||
- name: Build ZIP package
|
||||
run: |
|
||||
zip -r "service.video.hdrnotify-${{ steps.version.outputs.version }}.zip" \
|
||||
service.video.hdrnotify/ \
|
||||
-x "service.video.hdrnotify/.*"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: service.video.hdrnotify-${{ steps.version.outputs.version }}
|
||||
path: service.video.hdrnotify-${{ steps.version.outputs.version }}.zip
|
||||
|
||||
- name: Create GitHub Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: service.video.hdrnotify-${{ steps.version.outputs.version }}.zip
|
||||
generate_release_notes: true
|
||||
Reference in New Issue
Block a user