-
Notifications
You must be signed in to change notification settings - Fork 20
40 lines (39 loc) · 1.38 KB
/
addon-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# This workflow performs the required add-on checks for a submission
# to the official Kodi repository
name: Kodi
on:
- pull_request
- push
jobs:
tests:
name: Addon checker
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kodi-branch: [krypton, leia, matrix]
steps:
- uses: actions/checkout@v2
with:
path: ${{ github.repository }}
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get install xmlstarlet
python -m pip install --upgrade pip
pip install kodi-addon-checker
- name: Remove unwanted files
run: awk '/export-ignore/ { print $1 }' .gitattributes | xargs rm -rf --
working-directory: ${{ github.repository }}
- name: Rewrite addon.xml for older versions
run: |
xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v "2.25.0" addon.xml
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -u '/addon/@version' -v "${version%'+matrix.1'}" addon.xml
working-directory: ${{ github.repository }}
if: matrix.kodi-branch == 'krypton' || matrix.kodi-branch == 'leia'
- name: Run kodi-addon-checker
run: kodi-addon-checker --branch=${{ matrix.kodi-branch }} ${{ github.repository }}/