From e430c7223e89c629f9d856d6d75a89cbe6813e8d Mon Sep 17 00:00:00 2001 From: Oleksandr Berezovskyi Date: Mon, 1 Jun 2026 22:01:07 +0300 Subject: [PATCH] ci: add Gitea Actions workflow for building addon --- .gitea/workflows/build.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..65e2dd3 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -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/release-action@main + with: + files: service.video.hdrnotify-${{ steps.version.outputs.version }}.zip + api_key: '${{ secrets.GITEA_TOKEN }}'