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@v4 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 }}'