88jobs :
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
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
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