Skip to content

Commit bc5bc31

Browse files
committed
Update CI gotham
1 parent 21dba4d commit bc5bc31

2 files changed

Lines changed: 51 additions & 9 deletions

File tree

.github/workflows/addon-check.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
11
name: Kodi Addon-Check
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
tags-ignore:
8+
- v*
9+
pull_request:
10+
branches:
11+
- '*'
412

513
jobs:
614
kodi-addon-checker:
715
runs-on: ubuntu-latest
816
name: Kodi addon checker
917
steps:
18+
1019
- name: Checkout
1120
uses: actions/checkout@v1
21+
22+
- name: Extract official repo target
23+
shell: bash
24+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
25+
id: extract_branch
26+
1227
- name: Kodi addon checker validation
1328
id: kodi-addon-checker
14-
uses: xbmc/action-kodi-addon-checker@v1.0
29+
uses: xbmc/action-kodi-addon-checker@v1.2
1530
with:
16-
kodi-version: gotham
31+
kodi-version: ${{ steps.extract_branch.outputs.branch }}
32+
addon-id: ${{ github.event.repository.name }}
33+
is-pr: false

.github/workflows/addon-submitter.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,44 @@ on:
88
jobs:
99
kodi-addon-submitter:
1010
runs-on: ubuntu-latest
11-
name: Kodi addon submitter
11+
name: Kodi Addon Submitter
1212
steps:
13+
1314
- name: Checkout
1415
uses: actions/checkout@v1
16+
17+
- name: Extract kodi official repository target
18+
id: extract_branch_pr
19+
shell: bash
20+
env:
21+
ADDON_ID: ${{ github.event.repository.name }}
22+
run: |
23+
echo "##[set-output name=branch;]$(git --no-pager branch -a --contains "$GITHUB_SHA" | grep 'remotes/origin/' | cut -d '/' -f3)"
24+
if [[ $ADDON_ID == plugin* ]]; then
25+
echo "##[set-output name=repo;]repo-plugins"
26+
else
27+
echo "##[set-output name=repo;]repo-scripts"
28+
fi
29+
- name: Kodi addon checker validation
30+
id: kodi-addon-checker
31+
uses: xbmc/action-kodi-addon-checker@v1.2
32+
with:
33+
kodi-version: ${{ steps.extract_branch_pr.outputs.branch }}
34+
addon-id: ${{ github.event.repository.name }}
35+
is-pr: true
36+
1537
- name: Generate distribution zip and submit to official kodi repository
1638
id: kodi-addon-submitter
17-
uses: xbmc/action-kodi-addon-submitter@v1.0
39+
uses: xbmc/action-kodi-addon-submitter@v1.2
1840
with: # Replace all the below values
19-
kodi-repository: repo-plugins
20-
kodi-version: gotham
21-
addon-id: plugin.video.vimcasts
41+
kodi-repository: ${{ steps.extract_branch_pr.outputs.repo }}
42+
kodi-version: ${{ steps.extract_branch_pr.outputs.branch }}
43+
addon-id: ${{ github.event.repository.name }}
2244
env: # Make sure you create the below secrets (GH_TOKEN and EMAIL)
2345
GH_USERNAME: enenbot
2446
GH_TOKEN: ${{secrets.GH_TOKEN}}
2547
EMAIL: ${{secrets.EMAIL}}
48+
2649
- name: Create Github Release
2750
id: create_release
2851
uses: actions/create-release@v1.0.0
@@ -33,6 +56,8 @@ jobs:
3356
release_name: Release ${{ github.ref }}
3457
draft: false
3558
prerelease: false
59+
body: "Version for use in Kodi ${{ steps.extract_branch_pr.outputs.branch }} and above"
60+
3661
- name: Upload Addon zip to github release
3762
id: upload-release-asset
3863
uses: actions/upload-release-asset@v1.0.1
@@ -42,4 +67,4 @@ jobs:
4267
upload_url: ${{ steps.create_release.outputs.upload_url }}
4368
asset_path: ${{ steps.kodi-addon-submitter.outputs.addon-zip }}
4469
asset_name: ${{ steps.kodi-addon-submitter.outputs.addon-zip }}
45-
asset_content_type: application/zip
70+
asset_content_type: application/zip

0 commit comments

Comments
 (0)