Skip to content

Commit

Permalink
Add CI for automatic submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
enen92 committed Dec 5, 2019
1 parent f505615 commit 21dba4d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 22 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.gitignore export-ignore
.gitattributes export-ignore
.github export-ignore
tests/ export-ignore
31 changes: 9 additions & 22 deletions .github/workflows/addon-check.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
name: Addon Checker
name: Kodi Addon-Check

on: [push]

jobs:
build:

env:
BRANCH: gotham # Replace to match your case

kodi-addon-checker:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7]

name: Kodi addon checker
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
- name: Checkout
uses: actions/checkout@v1
- name: Kodi addon checker validation
id: kodi-addon-checker
uses: xbmc/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install kodi-addon-checker
- name: Addon check
run: |
kodi-addon-checker --branch=${{env.BRANCH}} .
kodi-version: gotham
45 changes: 45 additions & 0 deletions .github/workflows/addon-submitter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Kodi Addon-Submitter

on:
create:
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: gotham
addon-id: plugin.video.vimcasts
env: # Make sure you create the below secrets (GH_TOKEN and EMAIL)
GH_USERNAME: enenbot
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

0 comments on commit 21dba4d

Please sign in to comment.