Skip to content

Commit

Permalink
Prepare for v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelarnauts committed Nov 11, 2020
1 parent 116acc4 commit ad0ed3d
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 6 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Release plugin.video.tvvlaanderen
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 plugin.video.tvvlaanderen*.zip | grep -v '+matrix.' | head -1)
echo ::set-output name=matrix-filename::$(cd ..;ls plugin.video.tvvlaanderen*+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/action-kodi-addon-submitter@v1.2
# with:
# kodi-repository: repo-plugins
# addon-id: plugin.video.tvvlaanderen
# kodi-version: leia
# kodi-matrix: true
# env:
# GH_USERNAME: ${{ secrets.GH_USERNAME }}
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
# EMAIL: ${{ secrets.EMAIL }}
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Changelog
# Changelog

## [v0.0.1](https://github.com/add-ons/plugin.video.tvvlaanderen/tree/v0.0.1) (2020-11-11)

[Full Changelog](https://github.com/add-ons/plugin.video.tvvlaanderen/compare/de15b078e0084d6bf2ae0a60af1dd902cc81fcd0...v0.0.1)

**Implemented enhancements:**

- Use CAPI for EPG so we have more data [\#18](https://github.com/add-ons/plugin.video.tvvlaanderen/pull/18) ([michaelarnauts](https://github.com/michaelarnauts))
- Allow to install and run Kodi Logfile Uploader from the settings [\#17](https://github.com/add-ons/plugin.video.tvvlaanderen/pull/17) ([michaelarnauts](https://github.com/michaelarnauts))
- Allow to install IPTV Manager from the settings [\#16](https://github.com/add-ons/plugin.video.tvvlaanderen/pull/16) ([michaelarnauts](https://github.com/michaelarnauts))
- Implement IPTV Manager integration [\#11](https://github.com/add-ons/plugin.video.tvvlaanderen/pull/11) ([michaelarnauts](https://github.com/michaelarnauts))
- Implement replay [\#10](https://github.com/add-ons/plugin.video.tvvlaanderen/pull/10) ([michaelarnauts](https://github.com/michaelarnauts))
- Implement Restart & Replay [\#8](https://github.com/add-ons/plugin.video.tvvlaanderen/pull/8) ([michaelarnauts](https://github.com/michaelarnauts))
- Update fanart [\#6](https://github.com/add-ons/plugin.video.tvvlaanderen/pull/6) ([dagwieers](https://github.com/dagwieers))



\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
36 changes: 32 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
export KODI_HOME := $(CURDIR)/tests/home
export KODI_INTERACTIVE := 0
PYTHON := python
KODI_PYTHON_ABIS := 3.0.0 2.26.0

# Collect information to build as sensible package name
name = $(shell xmllint --xpath 'string(/addon/@id)' addon.xml)
version = $(shell xmllint --xpath 'string(/addon/@version)' addon.xml)
git_branch = $(shell git rev-parse --abbrev-ref HEAD)
git_hash = $(shell git rev-parse --short HEAD)
zip_name = $(name)-$(version)-$(git_branch)-$(git_hash).zip

ifdef release
zip_name = $(name)-$(version).zip
else
zip_name = $(name)-$(version)-$(git_branch)-$(git_hash).zip
endif

include_files = addon_entry.py addon.xml CHANGELOG.md LICENSE README.md resources/ service_entry.py
include_paths = $(patsubst %,$(name)/%,$(include_files))
exclude_files = \*.new \*.orig \*.pyc \*.pyo
Expand Down Expand Up @@ -59,6 +66,27 @@ build: clean
cd ..; zip -r $(zip_name) $(include_paths) -x $(exclude_files)
@echo "Successfully wrote package as: ../$(zip_name)"

release: build
rm -rf ../repo-plugins/$(name)/*
unzip ../$(zip_name) -d ../repo-plugins/
release:
ifneq ($(release),)
@github_changelog_generator -u add-ons -p plugin.video.tvvlaanderen --no-issues --future-release v$(release);

@echo "cd /addon/@version\nset $$release\nsave\nbye" | xmllint --shell addon.xml; \
# date=$(shell date '+%Y-%m-%d'); \
# echo "cd /addon/extension[@point='xbmc.addon.metadata']/news\nset v$$release ($$date)\nsave\nbye" | xmllint --shell addon.xml; \
# Next steps to release:
# - Modify the news-section of addons.xml
# - git add . && git commit -m "Prepare for v$(release)" && git push
# - git tag v$(release) && git push --tags
else
@echo "Usage: make release release=1.0.0"
endif

multizip: clean
@-$(foreach abi,$(KODI_PYTHON_ABIS), \
echo "cd /addon/requires/import[@addon='xbmc.python']/@version\nset $(abi)\nsave\nbye" | xmllint --shell addon.xml; \
matrix=$(findstring $(abi), $(word 1,$(KODI_PYTHON_ABIS))); \
if [ $$matrix ]; then version=$(version)+matrix.1; else version=$(version); fi; \
echo "cd /addon/@version\nset $$version\nsave\nbye" | xmllint --shell addon.xml; \
make build; \
)
3 changes: 2 additions & 1 deletion addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<disclaimer lang="en_GB">This add-on is not officially commissioned/supported by TV Vlaanderen and is provided 'as is' without any warranty of any kind. TV Vlaanderen is a brand of Canal+ Luxembourg S. à r.l.</disclaimer>
<platform>all</platform>
<license>GPL-3.0-only</license>
<news>v0.0.1</news>
<news>v0.0.1
- First release.</news>
<source>https://github.com/add-ons/plugin.video.tvvlaanderen</source>
<assets>
<icon>resources/icon.png</icon>
Expand Down

0 comments on commit ad0ed3d

Please sign in to comment.