Skip to content

[FR - MYCANAL] force 640p in DRM for devices not certified #4730

[FR - MYCANAL] force 640p in DRM for devices not certified

[FR - MYCANAL] force 640p in DRM for devices not certified #4730

Workflow file for this run

name: Release
on:
issue_comment:
types: created
jobs:
release:
name: Trigger release
runs-on: ubuntu-latest
if: github.event.comment.body == 'Trigger release' && (github.actor == 'sy6sy2' || github.actor == 'wwark' || github.actor == 'joaopa00')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out plugin repository master branch
uses: actions/checkout@v2
with:
fetch-depth: 0
path: master
ref: master
- name: Check out plugin repository dev branch
uses: actions/checkout@v2
with:
path: dev
ref: dev
- name: Set env
run: |
DEV_ADDON_XML_FP=dev/addon.xml
echo "* addon.xml filepath of dev branch: $DEV_ADDON_XML_FP"
CURRENT_DEV_VERSION=$(cat $DEV_ADDON_XML_FP|grep "<addon"|sed "s/.* version=\"\(.*\)\" .*/\1/")
echo "* Current dev version: $CURRENT_DEV_VERSION"
echo "CURRENT_DEV_VERSION=$CURRENT_DEV_VERSION" >> $GITHUB_ENV
RELEASE_VERSION=$(cat $DEV_ADDON_XML_FP|grep "<addon"|sed "s/.* version=\"\(.*\)~.*/\1/")
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
echo "* Next release version: $RELEASE_VERSION"
NEXT_DEV_VERSION=$(MINOR=$(cat $DEV_ADDON_XML_FP|grep "<addon"|sed "s/.* version=\"\(.*\)~.*/\1/"|cut -d. -f3) && echo "0.2.$((MINOR+1))~beta00")
echo "NEXT_DEV_VERSION=$NEXT_DEV_VERSION" >> $GITHUB_ENV
echo "* Next beta version: $NEXT_DEV_VERSION"
PLUGIN_CHANGELOG=$(cat $DEV_ADDON_XML_FP|sed -n '/<news>/,/<\/news>/p'|sed 's#<news>##g'|sed 's#</news>##g'|sed '/^ *$/d'|tr '\n' '@'|sed 's#@#<br />#g')
echo "PLUGIN_CHANGELOG=$PLUGIN_CHANGELOG" >> $GITHUB_ENV
echo "* Changelog: $PLUGIN_CHANGELOG"
- name: Update master code with dev code
working-directory: master
run: |
git reset --hard origin/dev
- name: Set release version on master addon.xml file
working-directory: master
run: sed -i "s#version=\"$CURRENT_DEV_VERSION\"#version=\"$RELEASE_VERSION\"#g" ./addon.xml
- name: Commit release on master branch
working-directory: master
run: |
git config user.name 'Release workflow'
git config user.email '[email protected]'
git add --all
git commit -m "Version bump ($RELEASE_VERSION)"
git push origin --force
- name: Create plugin zip files for Kodi
id: prepare_zip
working-directory: master
run: |
mkdir plugin.video.catchuptvandmore
mv addon.py plugin.video.catchuptvandmore
mv addon.xml plugin.video.catchuptvandmore
mv fanart.jpg plugin.video.catchuptvandmore
mv icon.png plugin.video.catchuptvandmore
mv LICENSE.txt plugin.video.catchuptvandmore
mv service.py plugin.video.catchuptvandmore
mv resources plugin.video.catchuptvandmore
sed -i 's#<reuselanguageinvoker>false</reuselanguageinvoker>#<reuselanguageinvoker>true</reuselanguageinvoker>#g' plugin.video.catchuptvandmore/addon.xml
zip -r plugin.video.catchuptvandmore.zip plugin.video.catchuptvandmore
echo "::set-output name=zip_filepath::$(realpath plugin.video.catchuptvandmore.zip)"
rm plugin.video.catchuptvandmore/resources/lib/openvpn.py
rm plugin.video.catchuptvandmore/resources/lib/vpn.py
find plugin.video.catchuptvandmore -name '*.py' -exec sed -i '/# delete_for_submission_start/,/# delete_for_submission_end/d' {} \;
find plugin.video.catchuptvandmore -name '*.po' -exec sed -i '/# delete_for_submission_start/,/# delete_for_submission_end/d' {} \;
find plugin.video.catchuptvandmore -name '*.xml' -exec sed -i '/<!-- delete_for_submission_start -->/,/<!-- delete_for_submission_end -->/d' {} \;
zip -r plugin.video.catchuptvandmore-no-openvpn.zip plugin.video.catchuptvandmore
echo "::set-output name=zip_no_openvpn_filepath::$(realpath plugin.video.catchuptvandmore-no-openvpn.zip)"
- name: Prepare dev branch for next beta
working-directory: dev
run: |
git config user.name 'Release workflow'
git config user.email '[email protected]'
sed -i "s#version=\"$CURRENT_DEV_VERSION\"#version=\"$NEXT_DEV_VERSION\"#g" ./addon.xml
git add --all
git commit -m "Version bump ($NEXT_DEV_VERSION)"
git push origin
- name: Prepare GitHub release
id: prepare_release
run: |
echo "::set-output name=tag_name::$(echo v$RELEASE_VERSION)"
echo "::set-output name=release_name::$(echo v$RELEASE_VERSION)"
echo "::set-output name=body::$(echo $PLUGIN_CHANGELOG)"
- name: Create Release
id: create_release
uses: actions/create-release@latest
with:
tag_name: ${{ steps.prepare_release.outputs.tag_name }}
release_name: ${{ steps.prepare_release.outputs.release_name }}
body: ${{ steps.prepare_release.outputs.body }}
draft: false
prerelease: false
- name: Upload release zip file
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.prepare_zip.outputs.zip_filepath }}
asset_name: plugin.video.catchuptvandmore.zip
asset_content_type: application/zip
- name: Upload no openvpn release zip file
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.prepare_zip.outputs.zip_no_openvpn_filepath }}
asset_name: plugin.video.catchuptvandmore-no-openvpn.zip
asset_content_type: application/zip
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Check out repository.catchuptvandmore repository
uses: actions/checkout@v2
with:
repository: Catch-up-TV-and-More/repository.catchuptvandmore
token: ${{ secrets.GITHUB_ACTIONS_ACCESS_TOKEN }}
path: repository.catchuptvandmore
- name: Install dependencies
working-directory: repository.catchuptvandmore
run: pip install -r requirements.txt
- name: Configure git
working-directory: repository.catchuptvandmore
run: |
git config user.name 'GitHub Actions'
git config user.email '[email protected]'
- name: Update all repositories
working-directory: repository.catchuptvandmore
run: ./update_all_repos.sh