Skip to content

Commit 21dba4d

Browse files
committed
Add CI for automatic submissions
1 parent f505615 commit 21dba4d

3 files changed

Lines changed: 58 additions & 22 deletions

File tree

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.gitignore export-ignore
2+
.gitattributes export-ignore
3+
.github export-ignore
4+
tests/ export-ignore

.github/workflows/addon-check.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,16 @@
1-
name: Addon Checker
1+
name: Kodi Addon-Check
22

33
on: [push]
44

55
jobs:
6-
build:
7-
8-
env:
9-
BRANCH: gotham # Replace to match your case
10-
6+
kodi-addon-checker:
117
runs-on: ubuntu-latest
12-
strategy:
13-
max-parallel: 4
14-
matrix:
15-
python-version: [3.7]
16-
8+
name: Kodi addon checker
179
steps:
18-
- uses: actions/checkout@v1
19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v1
10+
- name: Checkout
11+
uses: actions/checkout@v1
12+
- name: Kodi addon checker validation
13+
id: kodi-addon-checker
14+
uses: xbmc/action-kodi-addon-checker@v1.0
2115
with:
22-
python-version: ${{ matrix.python-version }}
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
pip install kodi-addon-checker
27-
- name: Addon check
28-
run: |
29-
kodi-addon-checker --branch=${{env.BRANCH}} .
16+
kodi-version: gotham
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Kodi Addon-Submitter
2+
3+
on:
4+
create:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
kodi-addon-submitter:
10+
runs-on: ubuntu-latest
11+
name: Kodi addon submitter
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v1
15+
- name: Generate distribution zip and submit to official kodi repository
16+
id: kodi-addon-submitter
17+
uses: xbmc/action-kodi-addon-submitter@v1.0
18+
with: # Replace all the below values
19+
kodi-repository: repo-plugins
20+
kodi-version: gotham
21+
addon-id: plugin.video.vimcasts
22+
env: # Make sure you create the below secrets (GH_TOKEN and EMAIL)
23+
GH_USERNAME: enenbot
24+
GH_TOKEN: ${{secrets.GH_TOKEN}}
25+
EMAIL: ${{secrets.EMAIL}}
26+
- name: Create Github Release
27+
id: create_release
28+
uses: actions/create-release@v1.0.0
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
tag_name: ${{ github.ref }}
33+
release_name: Release ${{ github.ref }}
34+
draft: false
35+
prerelease: false
36+
- name: Upload Addon zip to github release
37+
id: upload-release-asset
38+
uses: actions/upload-release-asset@v1.0.1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
upload_url: ${{ steps.create_release.outputs.upload_url }}
43+
asset_path: ${{ steps.kodi-addon-submitter.outputs.addon-zip }}
44+
asset_name: ${{ steps.kodi-addon-submitter.outputs.addon-zip }}
45+
asset_content_type: application/zip

0 commit comments

Comments
 (0)