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@v4
|
||||
|
||||
- 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@v3
|
||||
with:
|
||||
name: service.video.hdrnotify-${{ steps.version.outputs.version }}
|
||||
path: service.video.hdrnotify-${{ steps.version.outputs.version }}.zip
|
||||
|
||||
- name: Create Gitea Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||
with:
|
||||
files: service.video.hdrnotify-${{ steps.version.outputs.version }}.zip
|
||||
token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
Reference in New Issue
Block a user