-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't try to post unit test results for fork PRs (#27)
Also, suppress comments on PRs with unit test results.
- Loading branch information
1 parent
6876d6e
commit d7b234a
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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 | ||
dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json |