From 878c99e384d27693d113f6466ec3f08c69335535 Mon Sep 17 00:00:00 2001 From: cxfksword Date: Tue, 11 Oct 2022 16:14:53 +0800 Subject: [PATCH] Fix github action build --- .github/workflows/build.yaml | 15 +++++++-------- .github/workflows/publish.yaml | 5 ++--- build_plugin.py | 4 ++-- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7bf9bf4..9792bf5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,13 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Setup dotnet - uses: actions/setup-dotnet@v1 + - uses: actions/setup-dotnet@v3 with: dotnet-version: 6.0.x - - - name: Build Jellyfin Plugin - uses: oddstr13/jellyfin-plugin-repository-manager@v0.5.0 - id: jprm - with: - dotnet-target: "net6.0" + - name: Install dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Test + run: dotnet test --no-restore --verbosity normal diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index b6098c6..be67b88 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -7,7 +7,6 @@ on: env: dotnet-version: 6.0.x python-version: 3.8 - project: Jellyfin.Plugin.Danmu/Jellyfin.Plugin.Danmu.csproj branch: main artifact: danmu @@ -19,11 +18,11 @@ jobs: steps: - uses: actions/checkout@v3 - name: Setup dotnet - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.dotnet-version }} - name: Restore nuget packages - run: dotnet restore ${{ env.project }} + run: dotnet restore - name: Setup python uses: actions/setup-python@v2 with: diff --git a/build_plugin.py b/build_plugin.py index 59aedbc..b1d2696 100644 --- a/build_plugin.py +++ b/build_plugin.py @@ -29,13 +29,13 @@ if prerelease: else: jellyfin_repo_file = "./manifest.json" -jellyfin_repo_url = "https://github.com/cxfksword/jellyfin-plugin-danmu/releases/download" +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)) +os.system('sed -i "s/\/danmu\//%s\//" %s' % (git_version, jellyfin_repo_file)) print(version)