forked from dersphere/plugin.audio.shoutcast
-
Notifications
You must be signed in to change notification settings - Fork 3
70 lines (63 loc) · 2.36 KB
/
Copy pathaddon-submitter.yml
File metadata and controls
70 lines (63 loc) · 2.36 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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: Extract kodi official repository target
id: extract_branch_pr
shell: bash
env:
ADDON_ID: ${{ github.event.repository.name }}
run: |
echo "##[set-output name=branch;]$(git --no-pager branch -a --contains "$GITHUB_SHA" | grep 'remotes/origin/' | cut -d '/' -f3)"
if [[ $ADDON_ID == plugin* ]]; then
echo "##[set-output name=repo;]repo-plugins"
else
echo "##[set-output name=repo;]repo-scripts"
fi
- name: Kodi addon checker validation
id: kodi-addon-checker
uses: xbmc/action-kodi-addon-checker@v1.2
with:
kodi-version: ${{ steps.extract_branch_pr.outputs.branch }}
addon-id: ${{ github.event.repository.name }}
is-pr: true
- name: Generate distribution zip and submit to official kodi repository
id: kodi-addon-submitter
uses: xbmc/action-kodi-addon-submitter@v1.2
with: # Replace all the below values
kodi-repository: ${{ steps.extract_branch_pr.outputs.repo }}
kodi-version: ${{ steps.extract_branch_pr.outputs.branch }}
addon-id: ${{ github.event.repository.name }}
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/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
body: "Version for use in Kodi ${{ steps.extract_branch_pr.outputs.branch }} and above"
- name: Upload Addon zip to github release
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
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