Fix for Configure IPTV automatically (#109) #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
name: Release service.iptv.manager | |
if: startsWith(github.ref, 'refs/tags/') # prevent from running if it's not a tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build zip files | |
id: build | |
run: | | |
sudo apt-get install libxml2-utils | |
make multizip release=1 | |
echo ::set-output name=leia-filename::$(cd ..;ls service.iptv.manager*.zip | grep -v '+matrix.' | head -1) | |
echo ::set-output name=matrix-filename::$(cd ..;ls service.iptv.manager*+matrix.*.zip | head -1) | |
- name: Get body | |
id: get-body | |
run: | | |
description=$(sed '1,6d;/^## /,$d' CHANGELOG.md) | |
echo $description | |
description="${description//'%'/'%25'}" | |
description="${description//$'\n'/'%0A'}" | |
description="${description//$'\r'/'%0D'}" | |
echo ::set-output name=body::$description | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body: ${{ steps.get-body.outputs.body }} | |
draft: false | |
prerelease: false | |
- name: Upload Leia zip | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_name: ${{ steps.build.outputs.leia-filename }} | |
asset_path: ../${{ steps.build.outputs.leia-filename }} | |
asset_content_type: application/zip | |
- name: Upload Matrix zip | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_name: ${{ steps.build.outputs.matrix-filename }} | |
asset_path: ../${{ steps.build.outputs.matrix-filename }} | |
asset_content_type: application/zip | |
- name: Generate distribution zip and submit to official kodi repository | |
id: kodi-addon-submitter | |
uses: xbmc/[email protected] | |
with: | |
kodi-repository: repo-scripts | |
addon-id: service.iptv.manager | |
kodi-version: leia | |
kodi-matrix: true | |
env: | |
GH_USERNAME: ${{ secrets.GH_USERNAME }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
EMAIL: ${{ secrets.EMAIL }} |