Files
service.video.hdrnotify/.github/workflows/build.yml
T
2026-06-01 22:30:49 +03:00

43 lines
1.2 KiB
YAML

name: Build Kodi Addon
on:
push:
branches: [master]
tags: ["v*"]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
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@v3
with:
files: service.video.hdrnotify-${{ steps.version.outputs.version }}.zip
generate_release_notes: true