add github actions for test #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |