This action submits your addon to the official Kodi repository every time you push a tag. In the background it uses xbmc's kodi-addon-submitter.
Required The name of the repository to where you want to submit the addon. Values can be (repo-plugins or repo-scripts). Defaults to repo-plugins
.
Required The name of the minimal kodi version your addon is supposed to support. Default "leia"
.
This is equivalent to the branch name where your addon lives in the official kodi repository (repo-plugins or repo-scripts).
Required The id of your addon as defined in addon.xml.
Optional Boolean indicating if a Python 2/3 compatible addon will be submitted to the matrix
branch in addition to the target branch. This can be used if you want to update a Python 2/3 compatible addon both in matrix
(Kodi 19.x) and a lower branch at the same time. Do not use this option if you want to submit a Python 3 addon only to matrix
branch. Use the kodi-repository
input for this.
Optional Boolean indicating if the addon is stored in its own directory within the git repo.
Required A secret in your addon github repository that contains a github token with at least public_repo scope.
Required A secret containing your email address. This is used in git config
to submit the pull request.
Path to the addon release zip file
Path to the addon release zip file for matrix (if kodi-matrix
input is true
). This zip uses PEP440 local version identifier.
The below configuration will automatically submit your addon to the kodi repository when you create a new tag/release. For instance, supposing your addon update is version 1.0.1
:
git tag v1.0.1 && git push --tags
The configuration below assumes you are submitting an addon with id plugin.video.example
to the branch leia
of repo-plugins
.
name: Kodi Addon-Submitter
on:
push:
tags:
- v*
jobs:
kodi-addon-submitter:
runs-on: ubuntu-latest
name: Kodi addon submitter
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Generate distribution zip and submit to official kodi repository
id: kodi-addon-submitter
uses: xbmc/[email protected]
with: # Replace all the below variables
kodi-repository: repo-plugins
kodi-version: leia
addon-id: plugin.video.example
kodi-matrix: false # Submit a Python 2/3 compatible addon to matrix branch in addition to the target branch
sub-directory: false
env: # Make sure you create the below secrets (GH_TOKEN and EMAIL)
GH_USERNAME: ${{ github.actor }}
GH_TOKEN: ${{secrets.GH_TOKEN}}
EMAIL: ${{secrets.EMAIL}}
The configuration below automatically submits the addon to the same repository but also creates a github release and uploads the distribution zip to the github releases section of your github repository.
name: Kodi Addon-Submitter
on:
push:
tags:
- v*
jobs:
kodi-addon-submitter:
runs-on: ubuntu-latest
name: Kodi addon submitter
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Generate distribution zip and submit to official kodi repository
id: kodi-addon-submitter
uses: xbmc/[email protected]
with: # Replace all the below values
kodi-repository: repo-plugins
kodi-version: leia
addon-id: plugin.video.example
kodi-matrix: false # Submit a Python 2/3 compatible addon to matrix branch in addition to the target branch
sub-directory: false
env: # Make sure you create the below secrets (GH_TOKEN and EMAIL)
GH_USERNAME: ${{ github.actor }}
GH_TOKEN: ${{secrets.GH_TOKEN}}
EMAIL: ${{secrets.EMAIL}}
- name: Create Github Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Addon zip to github release
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.kodi-addon-submitter.outputs.addon-zip }}
asset_name: ${{ steps.kodi-addon-submitter.outputs.addon-zip }}
asset_content_type: application/zip
Note: The idea of generating a distribution zip is to automatically exclude some of your files from the submission (e.g. tests, .gitignore, .gitattributes, etc). This can be accomplished if you store a .gitattributes
file on the root of your repository containing the following:
.gitignore export-ignore
.gitattributes export-ignore
.github export-ignore