From ba8377fe319ab114687646b4d7c80bf030f09eef Mon Sep 17 00:00:00 2001 From: kookxiang Date: Sun, 5 May 2024 13:58:48 +0800 Subject: [PATCH] add github actions for test --- .github/workflows/jellyfin-unstable.yml | 33 +++++++++++++++++++ .../Jellyfin.Plugin.Bangumi.Test.csproj | 7 +--- .../Jellyfin.Plugin.Bangumi.csproj | 12 +------ 3 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/jellyfin-unstable.yml diff --git a/.github/workflows/jellyfin-unstable.yml b/.github/workflows/jellyfin-unstable.yml new file mode 100644 index 0000000..a294f0d --- /dev/null +++ b/.github/workflows/jellyfin-unstable.yml @@ -0,0 +1,33 @@ +name: 'Jellyfin (unstable) Plugin' + +on: + push: + branches: + - next + +permissions: + contents: read + packages: read + +jobs: + build: + name: Build Plugin + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8 + - name: Restore NuGet Packages + run: | + dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name jellyfin-unstable "https://nuget.pkg.github.com/jellyfin/index.json" + dotnet restore + - name: .NET Test + run: dotnet test --configuration Release Jellyfin.Plugin.Bangumi.Test + - name: .NET Publish + run: dotnet publish --configuration Release --output publish Jellyfin.Plugin.Bangumi + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: Jellyfin.Plugin.Bangumi + path: publish/*.dll diff --git a/Jellyfin.Plugin.Bangumi.Test/Jellyfin.Plugin.Bangumi.Test.csproj b/Jellyfin.Plugin.Bangumi.Test/Jellyfin.Plugin.Bangumi.Test.csproj index 46d1710..ab84a18 100644 --- a/Jellyfin.Plugin.Bangumi.Test/Jellyfin.Plugin.Bangumi.Test.csproj +++ b/Jellyfin.Plugin.Bangumi.Test/Jellyfin.Plugin.Bangumi.Test.csproj @@ -6,15 +6,10 @@ - - + - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/Jellyfin.Plugin.Bangumi/Jellyfin.Plugin.Bangumi.csproj b/Jellyfin.Plugin.Bangumi/Jellyfin.Plugin.Bangumi.csproj index 94dce21..c0690c6 100644 --- a/Jellyfin.Plugin.Bangumi/Jellyfin.Plugin.Bangumi.csproj +++ b/Jellyfin.Plugin.Bangumi/Jellyfin.Plugin.Bangumi.csproj @@ -6,13 +6,13 @@ 1.0.0.0 1.0.0.0 enable - true + @@ -23,14 +23,4 @@ - - - - - - - - - -