-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #190 from dagwieers/release-workflow
Add release workflow
- Loading branch information
Showing
4 changed files
with
95 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
build: | ||
name: Release service.upnext | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Build zip files | ||
run: | | ||
sudo apt-get install libxml2-utils | ||
make multizip release=1 | ||
- name: Get Krypton filename | ||
id: get-krypton-filename | ||
run: | | ||
echo ::set-output name=krypton-filename::$(cd ..;ls service.upnext*.zip | grep -v '+matrix.' | head -1) | ||
- name: Get Matrix filename | ||
id: get-matrix-filename | ||
run: | | ||
echo ::set-output name=matrix-filename::$(cd ..;ls service.upnext*+matrix.*.zip | head -1) | ||
- name: Get body | ||
id: get-body | ||
run: | | ||
description=$(sed '1,/^## Releases$/d;/## v[0-9\.]* ([0-9-]*)/d;/^$/,$d' README.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.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: ${{ steps.get-body.outputs.body }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Krypton/Leia zip | ||
id: upload-krypton-zip | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_name: ${{ steps.get-krypton-filename.outputs.krypton-filename }} | ||
asset_path: ../${{ steps.get-krypton-filename.outputs.krypton-filename }} | ||
asset_content_type: application/zip | ||
- name: Upload Matrix zip | ||
id: upload-matrix-zip | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_name: ${{ steps.get-matrix-filename.outputs.matrix-filename }} | ||
asset_path: ../${{ steps.get-matrix-filename.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-plugins | ||
kodi-version: krypton | ||
addon-id: service.upnext | ||
kodi-matrix: true | ||
env: | ||
GH_USERNAME: ${{secrets.GH_USERNAME}} | ||
GH_TOKEN: ${{secrets.GH_TOKEN}} | ||
EMAIL: ${{secrets.EMAIL}} |
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
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