diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8fef9eb..4553ebd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,17 +34,20 @@ jobs: run: dotnet test --configuration Release --no-build --verbosity normal --logger "junit;LogFilePath=test-results/results.xml" - name: Publish Unit Test Results uses: EnricoMi/publish-unit-test-result-action@v1.3 - if: always() + if: > + github.event_name == 'push' || + github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository with: github_token: ${{ secrets.GITHUB_TOKEN }} check_name: Unit Tests files: '**/test-results/**/*.xml' report_individual_runs: true - + comment_on_pr: false + - name: Pack if: ${{ startsWith(github.ref, 'refs/tags/release/') }} run: dotnet pack --configuration Release -p:Version=${{ env.VERSION }} --no-build - name: Push to NuGet.org if: ${{ startsWith(github.ref, 'refs/tags/release/') }} run: | - dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json \ No newline at end of file + dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json