From bf3830959d93c3f007f3a0b932982d2cdbaaf31d Mon Sep 17 00:00:00 2001
From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com>
Date: Sat, 5 Jun 2021 17:38:45 +0200
Subject: [PATCH 1/3] fix issue with prepare-release-pr workflow

---
 ...eate-release-pr.yaml => create-prepare-release-pr.yaml} | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
 rename .github/workflows/{create-release-pr.yaml => create-prepare-release-pr.yaml} (90%)

diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-prepare-release-pr.yaml
similarity index 90%
rename from .github/workflows/create-release-pr.yaml
rename to .github/workflows/create-prepare-release-pr.yaml
index b9cb6938..e09c5eaf 100644
--- a/.github/workflows/create-release-pr.yaml
+++ b/.github/workflows/create-prepare-release-pr.yaml
@@ -1,4 +1,4 @@
-name: Create Release PR
+name: Create Prepare-Release PR
 
 on:
   workflow_dispatch:
@@ -25,9 +25,12 @@ jobs:
           cat << EOF >> cl.md
           ${{ steps.draft.outputs.body }}
           EOF
+          sed -i cl.md -e 's/^*/-/'
           TAG="${{ steps.draft.outputs.tag_name }}"
           echo "VERSION=${TAG#v}" >> $GITHUB_ENV
-          echo "CHANGELOG=`cat cl.md | grep '*'`" >> $GITHUB_ENV
+          echo "CHANGELOG<<EOF" >> $GITHUB_ENV
+          cat cl.md | grep '^-' >> $GITHUB_ENV
+          echo "EOF" >> $GITHUB_ENV
           rm cl.md
 
       - name: Checkout repository

From 7f0047d666430a8c76d656cc8d2ae8217e1ad666 Mon Sep 17 00:00:00 2001
From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com>
Date: Sat, 5 Jun 2021 17:41:15 +0200
Subject: [PATCH 2/3] remove obsolete envVar pass in publish workflow

---
 .github/workflows/publish.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
index 8c18a0df..2c971753 100644
--- a/.github/workflows/publish.yaml
+++ b/.github/workflows/publish.yaml
@@ -57,7 +57,6 @@ jobs:
           host: ${{ secrets.DEPLOY_HOST  }}
           username: ${{ secrets.DEPLOY_USER }}
           key: ${{ secrets.DEPLOY_KEY }}
-          envs: JELLYFIN_VERSION
           script_stop: true
           script: |
             python3 /usr/local/bin/kodirepo add /srv/repository/incoming/kodi/plugin.video.jellyfin+${{ matrix.py_version }}.zip --datadir /srv/repository/releases/client/kodi/${{ matrix.py_version }};

From 97ea385dcf8014334c7a4f3c44c94a6e1b7579bc Mon Sep 17 00:00:00 2001
From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com>
Date: Sat, 5 Jun 2021 17:44:41 +0200
Subject: [PATCH 3/3] add release readme for GitHub workflows

---
 .github/releasing.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 .github/releasing.md

diff --git a/.github/releasing.md b/.github/releasing.md
new file mode 100644
index 00000000..2ca99d34
--- /dev/null
+++ b/.github/releasing.md
@@ -0,0 +1,12 @@
+# Releasing a new Version via GitHub Actions
+
+0. (optional) label the PRs you want to include in this release (if you want to group them in the GH release based on topics). \
+   Supported labels can be found in the Release Drafter [config-file](https://github.com/jellyfin/jellyfin-meta-plugins/blob/master/.github/release-drafter.yml) (currently inherited from `jellyfin/jellyfin-meta-plugins`)
+1. ensure you have merged the PRs you want to include in the release and that the so far drafted GitHub release has captured them
+2. Create a `release-prep` PR by manually triggering the 'Create Prepare-Release PR' Workflow from the Actions tab on GitHub
+3. check the newly created `Prepare for release vx.y.z` PR if updated the `release.yaml` properly (update it manually if need be)
+4. merge the `Prepare for release vx.y.z` and let the Actions triggered by doing that finis (should just be a couple of seconds)
+5. FINALLY, trigger the `Publish Jellyfin-Kodi` manually from the Actions tab on GitHub.
+    1. this will release the up to that point drafted GitHub Release and tag the default branch accordingly
+    2. this will package and deploy `Jellyfin-Kodi` in the new version to the deployment server and trigger the 'kodirepo' script on it
+6. Done, assuming everything ran successfully, you have now successfully published a new version! :tada: