2121 permissions :
2222 checks : write
2323 name : Run tests and create NuGet package
24- outputs :
25- nupkg-filename : ${{ steps.dotnet-pack.outputs.nupkg-filename }}
2624 steps :
2725 - name : Checkout git repository
2826 uses : actions/checkout@v3
4341 run : dotnet build --no-restore
4442 - name : Run tests
4543 run : dotnet test --no-build
46- id : dotnet-test
4744 - name : Upload received files from failing tests
4845 uses : actions/upload-artifact@v3
4946 if : failure()
@@ -78,13 +75,12 @@ jobs:
7875 coverage-reports : coverage/*/coverage.cobertura.xml
7976 - name : Create NuGet package
8077 run : dotnet pack --no-build --output .
81- id : dotnet-pack
8278 - name : Upload NuGet package artifact
8379 if : matrix.os == 'ubuntu-latest'
8480 uses : actions/upload-artifact@v3
8581 with :
86- name : ${{ steps.dotnet-pack.outputs.nupkg-filename }}
87- path : ${{ steps.dotnet-pack.outputs. nupkg-filename }}
82+ name : NuGet package
83+ path : " *. nupkg"
8884 - name : Run mutation tests and upload report to Stryker dashboard
8985 env :
9086 STRYKER_DASHBOARD_API_KEY : ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
@@ -114,7 +110,7 @@ jobs:
114110 - name : Download NuGet package artifact
115111 uses : actions/download-artifact@v3
116112 with :
117- name : ${{ needs. package.outputs.nupkg-filename }}
113+ name : NuGet package
118114 - name : Download release notes artifact
119115 uses : actions/download-artifact@v3
120116 with :
@@ -126,4 +122,4 @@ jobs:
126122 body_path : ReleaseNotes.md
127123 prerelease : ${{ contains(github.ref_name, '-') }}
128124 - name : Publish NuGet package on nuget.org
129- run : dotnet nuget push ${{ needs.package.outputs. nupkg-filename }} --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}"
125+ run : dotnet nuget push "*. nupkg" --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_API_KEY }}"
0 commit comments