diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8fef9eb..ecca366 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,18 +33,21 @@ jobs: - name: Test 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() + uses: EnricoMi/publish-unit-test-result-action@f8a3fca6035d817e664cd0bf57d7fefc407847ee # pre-1.4, adds comment_on_pr option + 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