From 4cb39ddc37bbcd09f13974c397fe0a399ef3722f Mon Sep 17 00:00:00 2001 From: cxfksword Date: Tue, 11 Oct 2022 16:07:47 +0800 Subject: [PATCH] Fix github action build --- .github/workflows/publish.yaml | 3 ++- build_plugin.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 16f53c8..b6098c6 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -9,6 +9,7 @@ env: python-version: 3.8 project: Jellyfin.Plugin.Danmu/Jellyfin.Plugin.Danmu.csproj branch: main + artifact: danmu jobs: build: @@ -35,7 +36,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./artifacts/danmu_*.zip + file: ./artifacts/${{ env.artifact }}_*.zip tag: ${{ github.ref }} file_glob: true - name: Update manifest diff --git a/build_plugin.py b/build_plugin.py index 10356d2..59aedbc 100644 --- a/build_plugin.py +++ b/build_plugin.py @@ -29,11 +29,13 @@ if prerelease: else: jellyfin_repo_file = "./manifest.json" -jellyfin_repo_url = "https://github.com/cxfksword/jellyfin-plugin-danmu/releases/download/%s" % (git_version) +jellyfin_repo_url = "https://github.com/cxfksword/jellyfin-plugin-danmu/releases/download" zipfile = os.popen('jprm --verbosity=debug plugin build "." --output="%s" --version="%s" --dotnet-framework="net6.0"' % (artifact_dir, version)).read().strip() os.system('jprm repo add --url=%s %s %s' % (jellyfin_repo_url, jellyfin_repo_file, zipfile)) +os.system('sed -i "s/\/danmu\//%s\//" %s' % (version, jellyfin_repo_file)) + print(version)