From ddd61fa39c9fdcefabf8e3502d024be97ab3f1a7 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Sat, 4 May 2024 16:16:20 +0200 Subject: [PATCH 01/35] Automate build and release --- .github/workflows/build.yaml | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..38dcf9a --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,53 @@ +name: Stable Release + +on: + release: + types: + - released + branches: master + +jobs: + build: + runs-on: ubuntu-latest + name: Build & Release + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Get release version + id: currenttag + uses: "WyriHaximus/github-action-get-previous-tag@v1" + + - name: Setup .Net + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + + - name: Restore Nuget Packages + run: dotnet restore Jellyfin.Plugin.TubeArchivistMetadata/Jellyfin.Plugin.TubeArchivistMetadata.csproj + + - name: Build Jellyfin Plugin + uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 + id: jprm + with: + dotnet-target: "${{ inputs.dotnet-target }}" + + - name: Upload Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.jprm.outputs.artifact }} + tag: ${{ github.ref }} + file_glob: true + + - name: Update manifest.json + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: master + commit_message: "Update manifest.json" + file_pattern: manifest.json + skip_fetch: true From 6e24a61623e5d79828ddaef924fb808dd6b49208 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Sat, 4 May 2024 16:42:19 +0200 Subject: [PATCH 02/35] Set correct dotnet-target --- build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.yaml b/build.yaml index 921fdb3..4403694 100644 --- a/build.yaml +++ b/build.yaml @@ -1,9 +1,9 @@ --- name: "TubeArchivistMetadata" guid: "dc97d0c6-28b0-4242-afb4-5833ae1b3715" -version: "1.2.3.0" -targetAbi: "10.8.0.0" -framework: "net6.0" +version: "1.3.0.0" +targetAbi: "10.9.0.0" +framework: "net8.0" overview: "Metadata for your TubeArchivist library on Jellyfin" description: > TubeArchivistMetadata is a plugin that automatically manages @@ -13,4 +13,4 @@ owner: "DarkFighterLuke" artifacts: - "Jellyfin.Plugin.TubeArchivistMetadata.dll" changelog: > - Add fix for unclosed HTML breaks + Support new Jellyfin API From 37a49ddabd16d6abf688ee40ddeed8d42e5ede6a Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Sat, 4 May 2024 16:46:13 +0200 Subject: [PATCH 03/35] Fix path --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 38dcf9a..552beba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,7 +34,8 @@ jobs: uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 id: jprm with: - dotnet-target: "${{ inputs.dotnet-target }}" + dotnet-target: net6.0 + path: Jellyfin.Plugin.TubeArchivistMetadata/ - name: Upload Release uses: svenstaro/upload-release-action@v2 From 8e77326c20893e2df1e7ce35fb63e6e401e90f0d Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Mon, 6 May 2024 23:59:29 +0200 Subject: [PATCH 04/35] Add solution file --- TubeArchivistMetadata.sln | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 TubeArchivistMetadata.sln diff --git a/TubeArchivistMetadata.sln b/TubeArchivistMetadata.sln new file mode 100644 index 0000000..c9406f6 --- /dev/null +++ b/TubeArchivistMetadata.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Plugin.TubeArchivistMetadata", "Jellyfin.Plugin.TubeArchivistMetadata\Jellyfin.Plugin.TubeArchivistMetadata.csproj", "{7A112ACB-79E8-4FC9-BCF6-B3AC849DA2D4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7A112ACB-79E8-4FC9-BCF6-B3AC849DA2D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A112ACB-79E8-4FC9-BCF6-B3AC849DA2D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A112ACB-79E8-4FC9-BCF6-B3AC849DA2D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A112ACB-79E8-4FC9-BCF6-B3AC849DA2D4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal From 83b92f5dfe1b6132ed2b5c16dfc57b5e1a31aed1 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 00:09:15 +0200 Subject: [PATCH 05/35] Fix paths and version --- .github/workflows/build.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 552beba..afc17f3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,7 +19,7 @@ jobs: fetch-depth: 0 - name: Get release version - id: currenttag + id: newtag uses: "WyriHaximus/github-action-get-previous-tag@v1" - name: Setup .Net @@ -27,15 +27,13 @@ jobs: with: dotnet-version: 6.0.x - - name: Restore Nuget Packages - run: dotnet restore Jellyfin.Plugin.TubeArchivistMetadata/Jellyfin.Plugin.TubeArchivistMetadata.csproj - - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 id: jprm with: dotnet-target: net6.0 - path: Jellyfin.Plugin.TubeArchivistMetadata/ + version: ${{ steps.newtag.outputs.tag }} + - name: Upload Release uses: svenstaro/upload-release-action@v2 From 06efee00513f13cfb3aa14a11298df7cb9b619ce Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 00:14:09 +0200 Subject: [PATCH 06/35] Fix plugin version in workflow --- .github/workflows/build.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index afc17f3..2413731 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,12 +27,18 @@ jobs: with: dotnet-version: 6.0.x + - name: Get version number only + run: | + TAG=${{ github.event.release.tag_name }} + echo "VERSION=${TAG#v}" >> $GITHUB_ENV + + - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 id: jprm with: dotnet-target: net6.0 - version: ${{ steps.newtag.outputs.tag }} + version: ${VERSION} - name: Upload Release From 8d89c82660ccca7a1c5c7c301114fa0ff9209d5f Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 00:16:58 +0200 Subject: [PATCH 07/35] Add imageUrl --- build.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.yaml b/build.yaml index 4403694..3c8be07 100644 --- a/build.yaml +++ b/build.yaml @@ -1,9 +1,10 @@ --- name: "TubeArchivistMetadata" guid: "dc97d0c6-28b0-4242-afb4-5833ae1b3715" +imageUrl: https://raw.githubusercontent.com/tubearchivist/tubearchivist-jf-plugin/master/images/logo.png version: "1.3.0.0" -targetAbi: "10.9.0.0" -framework: "net8.0" +targetAbi: "10.8.0.0" +framework: "net6.0" overview: "Metadata for your TubeArchivist library on Jellyfin" description: > TubeArchivistMetadata is a plugin that automatically manages @@ -13,4 +14,4 @@ owner: "DarkFighterLuke" artifacts: - "Jellyfin.Plugin.TubeArchivistMetadata.dll" changelog: > - Support new Jellyfin API + Test automatic release From 37c705620489f4a1723739ca21d4ea43460d4863 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 15:04:36 +0200 Subject: [PATCH 08/35] Give write permission to upload --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2413731..ce8ebdd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -43,6 +43,8 @@ jobs: - name: Upload Release uses: svenstaro/upload-release-action@v2 + permissions: + contents: write with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ steps.jprm.outputs.artifact }} From ca56fcac34a0d62e387a9a54c1f27b8256bda655 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 15:04:36 +0200 Subject: [PATCH 09/35] Give write permission to upload --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2413731..a821a63 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,6 +10,8 @@ jobs: build: runs-on: ubuntu-latest name: Build & Release + upload.permissions: + contents: write steps: - name: Checkout @@ -40,9 +42,9 @@ jobs: dotnet-target: net6.0 version: ${VERSION} - - name: Upload Release uses: svenstaro/upload-release-action@v2 + id: upload with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ steps.jprm.outputs.artifact }} From 857ca0f8e01cb998cf8522ac18c104553b97ba4b Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 15:45:12 +0200 Subject: [PATCH 10/35] Change asset name --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index af47456..9b384aa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -49,7 +49,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ steps.jprm.outputs.artifact }} tag: ${{ github.ref }} - file_glob: true + asset_name: TubeArchivistMetadata-$tag.zip - name: Update manifest.json uses: stefanzweifel/git-auto-commit-action@v4 From 3b9d235aee2b0c4438d7d308340bae6236aea9ad Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 15:47:57 +0200 Subject: [PATCH 11/35] Use only version number in file name --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9b384aa..337bbda 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -49,7 +49,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ steps.jprm.outputs.artifact }} tag: ${{ github.ref }} - asset_name: TubeArchivistMetadata-$tag.zip + asset_name: TubeArchivistMetadata-${VERSION}.zip - name: Update manifest.json uses: stefanzweifel/git-auto-commit-action@v4 From 59550760eb396a32ea4a9556b3e5e0a3a61bf228 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 15:51:31 +0200 Subject: [PATCH 12/35] Fix attempt for version in file name --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 337bbda..f1879e7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -49,7 +49,8 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ steps.jprm.outputs.artifact }} tag: ${{ github.ref }} - asset_name: TubeArchivistMetadata-${VERSION}.zip + version: ${VERSION} + asset_name: TubeArchivistMetadata-$version.zip - name: Update manifest.json uses: stefanzweifel/git-auto-commit-action@v4 From ebb74cf7f58cccf8421d98891ad4ce9b3d0b5179 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 15:56:47 +0200 Subject: [PATCH 13/35] Fix artifact name --- .github/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f1879e7..a708dc7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -49,8 +49,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ${{ steps.jprm.outputs.artifact }} tag: ${{ github.ref }} - version: ${VERSION} - asset_name: TubeArchivistMetadata-$version.zip + asset_name: TubeArchivistMetadata-${{ env.VERSION }}.zip - name: Update manifest.json uses: stefanzweifel/git-auto-commit-action@v4 From 1f33b908be4dfe1ebfd4253120995a21ce672c78 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 16:02:25 +0200 Subject: [PATCH 14/35] Revert "Set correct dotnet-target" This reverts commit 6e24a61623e5d79828ddaef924fb808dd6b49208. --- build.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.yaml b/build.yaml index 3c8be07..921fdb3 100644 --- a/build.yaml +++ b/build.yaml @@ -1,8 +1,7 @@ --- name: "TubeArchivistMetadata" guid: "dc97d0c6-28b0-4242-afb4-5833ae1b3715" -imageUrl: https://raw.githubusercontent.com/tubearchivist/tubearchivist-jf-plugin/master/images/logo.png -version: "1.3.0.0" +version: "1.2.3.0" targetAbi: "10.8.0.0" framework: "net6.0" overview: "Metadata for your TubeArchivist library on Jellyfin" @@ -14,4 +13,4 @@ owner: "DarkFighterLuke" artifacts: - "Jellyfin.Plugin.TubeArchivistMetadata.dll" changelog: > - Test automatic release + Add fix for unclosed HTML breaks From 03c77fcbc5dd86a1bc4b518f6595ec1e9b2b9d25 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 16:03:27 +0200 Subject: [PATCH 15/35] Add imageUrl --- build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build.yaml b/build.yaml index 921fdb3..e557709 100644 --- a/build.yaml +++ b/build.yaml @@ -1,6 +1,7 @@ --- name: "TubeArchivistMetadata" guid: "dc97d0c6-28b0-4242-afb4-5833ae1b3715" +imageUrl: https://raw.githubusercontent.com/tubearchivist/tubearchivist-jf-plugin/master/images/logo.png version: "1.2.3.0" targetAbi: "10.8.0.0" framework: "net6.0" From d6cf76f948ab6347732c1370d5bb00bc6112396d Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 22:24:09 +0200 Subject: [PATCH 16/35] Change plugin description --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 80a04c8..2e76157 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "category": "Metadata", "guid": "dc97d0c6-28b0-4242-afb4-5833ae1b3715", "name": "TubeArchivistMetadata", - "description": "A new and fully integrated way to manage metadata and organize your TubeArchivist library videos on Jellyfin.", + "description": "TubeArchivistMetadata is a plugin that automatically manages metadata for videos downloaded with TubeArchivist from YouTube.\n", "owner": "DarkFighterLuke", "overview": "Metadata for your TubeArchivist library on Jellyfin", "imageUrl": "https://raw.githubusercontent.com/tubearchivist/tubearchivist-jf-plugin/master/images/logo.png", From 9b0c4b5d3479be67315378edf9caffd73e5b97d7 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 22:53:24 +0200 Subject: [PATCH 17/35] Set release message --- .github/workflows/build.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a708dc7..c489ab4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,7 +34,6 @@ jobs: TAG=${{ github.event.release.tag_name }} echo "VERSION=${TAG#v}" >> $GITHUB_ENV - - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 id: jprm @@ -42,6 +41,19 @@ jobs: dotnet-target: net6.0 version: ${VERSION} + - name: Generate release message + run: | + # Read the YAML file and extract the value of the 'changelog' field + changelog=$(awk '/changelog:/ {flag=1; next} /^[^ ]/ {flag=0} flag' build.yaml | awk '{$1=$1};1') + + # Check if changelog contains multiple lines + if [[ $(echo "$changelog" | wc -l) -gt 1 ]]; then + changelog=$(echo "$changelog" | sed 's/^/*/') + else + changelog="*$changelog" + fi + echo "RELEASE_MESSAGE=$(echo Changelog:; echo $changelog)" >> GITHUB_ENV + - name: Upload Release uses: svenstaro/upload-release-action@v2 id: upload @@ -50,6 +62,7 @@ jobs: file: ${{ steps.jprm.outputs.artifact }} tag: ${{ github.ref }} asset_name: TubeArchivistMetadata-${{ env.VERSION }}.zip + body: ${{ env.RELEASE_MESSAGE }} - name: Update manifest.json uses: stefanzweifel/git-auto-commit-action@v4 From aab2de61897a5927657396bbe20d5cd6d2a33c18 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 22:56:52 +0200 Subject: [PATCH 18/35] Move release message creation before build task --- .github/workflows/build.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c489ab4..cae23f0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,13 +34,6 @@ jobs: TAG=${{ github.event.release.tag_name }} echo "VERSION=${TAG#v}" >> $GITHUB_ENV - - name: Build Jellyfin Plugin - uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 - id: jprm - with: - dotnet-target: net6.0 - version: ${VERSION} - - name: Generate release message run: | # Read the YAML file and extract the value of the 'changelog' field @@ -54,6 +47,13 @@ jobs: fi echo "RELEASE_MESSAGE=$(echo Changelog:; echo $changelog)" >> GITHUB_ENV + - name: Build Jellyfin Plugin + uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 + id: jprm + with: + dotnet-target: net6.0 + version: ${VERSION} + - name: Upload Release uses: svenstaro/upload-release-action@v2 id: upload From da56d00689dc31ae0d6ce1d289a2fff0261cbcd3 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 22:59:41 +0200 Subject: [PATCH 19/35] Fix variable definition --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cae23f0..5ffed07 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,7 @@ jobs: else changelog="*$changelog" fi - echo "RELEASE_MESSAGE=$(echo Changelog:; echo $changelog)" >> GITHUB_ENV + echo "RELEASE_MESSAGE=$(echo Changelog:; echo $changelog)" >> $GITHUB_ENV - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 From 3c33025cfaef1bb34c7a021dff97c7997d629722 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Tue, 7 May 2024 23:01:36 +0200 Subject: [PATCH 20/35] Add quotes --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5ffed07..025398c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,7 @@ jobs: else changelog="*$changelog" fi - echo "RELEASE_MESSAGE=$(echo Changelog:; echo $changelog)" >> $GITHUB_ENV + echo "RELEASE_MESSAGE=$(echo Changelog:; echo "$changelog")" >> $GITHUB_ENV - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 From 8b6eae7a6c90c85038ae49676cec8ebea8320141 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 22:22:09 +0200 Subject: [PATCH 21/35] Fix release message variable --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 025398c..e3e89da 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,7 @@ jobs: else changelog="*$changelog" fi - echo "RELEASE_MESSAGE=$(echo Changelog:; echo "$changelog")" >> $GITHUB_ENV + export RELEASE_MESSAGE=$(printf "Changelog:\n$changelog") - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 From 5b14b3ac878b494cf6a163e8f4b2cc25f196c2f3 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 22:26:51 +0200 Subject: [PATCH 22/35] Attempt to set RELEASE_MESSAGE --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e3e89da..396ce47 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,8 @@ jobs: else changelog="*$changelog" fi - export RELEASE_MESSAGE=$(printf "Changelog:\n$changelog") + export RELEASE_MESSAGE="Changelog: + $changelog" - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 From a7c6d575edcc5ce8e5f988afeab21357e5f5d15a Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 22:31:55 +0200 Subject: [PATCH 23/35] Attempt to set release message --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 396ce47..71d7eb2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,8 +45,8 @@ jobs: else changelog="*$changelog" fi - export RELEASE_MESSAGE="Changelog: - $changelog" + RELEASE_MESSAGE=$(printf "Changelog:\n$changelog") + printf "%b\n" "$RELEASE_MESSAGE" >> $GITHUB_ENV - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 From a5904a53106d2b7ee0ad358184b45e88a2435df6 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 22:35:34 +0200 Subject: [PATCH 24/35] Attempt to set release message --- .github/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 71d7eb2..c861eba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,8 +45,7 @@ jobs: else changelog="*$changelog" fi - RELEASE_MESSAGE=$(printf "Changelog:\n$changelog") - printf "%b\n" "$RELEASE_MESSAGE" >> $GITHUB_ENV + echo "RELEASE_MESSAGE=$(printf \"Changelog:\n$changelog\")" >> $GITHUB_ENV - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 From 9f2c7e4510c0f93c84e4bccffed67c572d04e46b Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 23:24:07 +0200 Subject: [PATCH 25/35] Run workflow on tag creation and create release automatically --- .github/workflows/build.yaml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c861eba..3fc91fc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,9 +1,9 @@ -name: Stable Release +name: TubeArchivistMetadata Release on: - release: - types: - - released + push: + tags: + - v* branches: master jobs: @@ -54,14 +54,12 @@ jobs: dotnet-target: net6.0 version: ${VERSION} - - name: Upload Release - uses: svenstaro/upload-release-action@v2 - id: upload + - name: Create release + uses: ncipollo/release-action@v1 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ steps.jprm.outputs.artifact }} - tag: ${{ github.ref }} - asset_name: TubeArchivistMetadata-${{ env.VERSION }}.zip + token: ${{ secrets.GITHUB_TOKEN }} + artifacts: ${{ steps.jprm.outputs.artifact }} + makeLatest: latest body: ${{ env.RELEASE_MESSAGE }} - name: Update manifest.json From f70527d218f3be14f78c6ebe4301bd64e073d54c Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 23:30:10 +0200 Subject: [PATCH 26/35] Trigger push event --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3fc91fc..94ff2cb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -60,7 +60,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} artifacts: ${{ steps.jprm.outputs.artifact }} makeLatest: latest - body: ${{ env.RELEASE_MESSAGE }} + body: ${{ env.RELEASE_MESSAGE }} - name: Update manifest.json uses: stefanzweifel/git-auto-commit-action@v4 From 8cbdeee818684a78f2a94c5af0b1b653b5aeec90 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 23:31:09 +0200 Subject: [PATCH 27/35] Trigger push event --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 94ff2cb..3fc91fc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -60,7 +60,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} artifacts: ${{ steps.jprm.outputs.artifact }} makeLatest: latest - body: ${{ env.RELEASE_MESSAGE }} + body: ${{ env.RELEASE_MESSAGE }} - name: Update manifest.json uses: stefanzweifel/git-auto-commit-action@v4 From c93d7052161cb0771f8c969961808db20bf3a6db Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 23:35:54 +0200 Subject: [PATCH 28/35] Set latest tag --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3fc91fc..482e5cf 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,7 +31,7 @@ jobs: - name: Get version number only run: | - TAG=${{ github.event.release.tag_name }} + TAG=${{ steps.newtag.outputs.tag }} echo "VERSION=${TAG#v}" >> $GITHUB_ENV - name: Generate release message @@ -61,6 +61,7 @@ jobs: artifacts: ${{ steps.jprm.outputs.artifact }} makeLatest: latest body: ${{ env.RELEASE_MESSAGE }} + tag: ${{ steps.newtag.outputs.tag }} - name: Update manifest.json uses: stefanzweifel/git-auto-commit-action@v4 From 107aa0ed6cf2285ddc8e8b90cdec5afab0ef2d4a Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 23:40:49 +0200 Subject: [PATCH 29/35] Allow updates --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 482e5cf..89cc895 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -62,6 +62,7 @@ jobs: makeLatest: latest body: ${{ env.RELEASE_MESSAGE }} tag: ${{ steps.newtag.outputs.tag }} + allowUpdates: true - name: Update manifest.json uses: stefanzweifel/git-auto-commit-action@v4 From 00047b6753a8d75f4d5479424a8dd5e390b59789 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 8 May 2024 23:45:17 +0200 Subject: [PATCH 30/35] Remove useless branch condition --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 89cc895..ec6d10b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,6 @@ on: push: tags: - v* - branches: master jobs: build: From 6803016a17131f6570927a7195b6cfadfee77a93 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Thu, 9 May 2024 10:06:49 +0200 Subject: [PATCH 31/35] Create release changelog file --- .github/workflows/build.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ec6d10b..fe008f9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,11 +40,15 @@ jobs: # Check if changelog contains multiple lines if [[ $(echo "$changelog" | wc -l) -gt 1 ]]; then - changelog=$(echo "$changelog" | sed 's/^/*/') + changelog=$(echo "$changelog" | sed 's/^/* /') else changelog="*$changelog" fi - echo "RELEASE_MESSAGE=$(printf \"Changelog:\n$changelog\")" >> $GITHUB_ENV + + # Create release-changelog.md + echo "Changelog:" > release-changelog.md + echo "$changelog" | sed 's/^/* /' >> release-changelog.md + - name: Build Jellyfin Plugin uses: oddstr13/jellyfin-plugin-repository-manager@843260fcdfda7cba229c5abd77bdd9c6fc4e850b # v1.1.0 @@ -59,7 +63,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} artifacts: ${{ steps.jprm.outputs.artifact }} makeLatest: latest - body: ${{ env.RELEASE_MESSAGE }} + bodyFile: release-changelog.md tag: ${{ steps.newtag.outputs.tag }} allowUpdates: true From 13fd9de0105a11e3e396dea2d5aadb0b72fe0232 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Thu, 9 May 2024 10:10:14 +0200 Subject: [PATCH 32/35] Fix double * --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fe008f9..b8c78b5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,7 +47,7 @@ jobs: # Create release-changelog.md echo "Changelog:" > release-changelog.md - echo "$changelog" | sed 's/^/* /' >> release-changelog.md + echo "$changelog" >> release-changelog.md - name: Build Jellyfin Plugin From bc5fd7fa2003ce78ede4789219cb60e9ae09663b Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Thu, 9 May 2024 10:14:52 +0200 Subject: [PATCH 33/35] Add missing space --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b8c78b5..c1536c8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,7 +42,7 @@ jobs: if [[ $(echo "$changelog" | wc -l) -gt 1 ]]; then changelog=$(echo "$changelog" | sed 's/^/* /') else - changelog="*$changelog" + changelog="* $changelog" fi # Create release-changelog.md From c4b1d1d954c65d4c155808e7bf2813e8b7fc59f9 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke <31162436+DarkFighterLuke@users.noreply.github.com> Date: Thu, 9 May 2024 10:41:52 +0200 Subject: [PATCH 34/35] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 847a152..6b88818 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The plugin interacts with TubeArchivist APIs to fetch videos and channels metada 5. Restart Jellyfin to apply the changes ### From ZIP in GitHub releases -1. Download the latest available release (`TubeArchivistMetadata-*.zip`) from the repository releases section +1. Download the latest available release (`tubearchivistmetadata_*.zip`) from the repository releases section 2. Extract the contained files in the `plugins/TubeArchivistMetadata` folder (you might need to create the folders) of your Jellyfin installation 3. Restart Jellyfin to apply the changes From bff3b2b59afd465126daf1d16df45707fbbbac4a Mon Sep 17 00:00:00 2001 From: DarkFighterLuke <31162436+DarkFighterLuke@users.noreply.github.com> Date: Thu, 9 May 2024 10:46:47 +0200 Subject: [PATCH 35/35] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b88818..a96d07e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ The plugin interacts with TubeArchivist APIs to fetch videos and channels metada 3. Go to the `Catalog` tab 4. Find `TubeArchivistMetadata` in the `Metadata` section and install it -![Find plugin](https://github.com/tubearchivist/tubearchivist-jf-plugin/assets/31162436/86897215-bac5-4cef-8bd3-ffec731b0875) +![Find plugin](https://github.com/tubearchivist/tubearchivist-jf-plugin/assets/31162436/a30a14c2-33cd-44c1-b96a-406662726e5e) 5. Restart Jellyfin to apply the changes ### From ZIP in GitHub releases