Skip to content

Commit

Permalink
Only Create release and publish if not PR
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomatossilva committed Jun 12, 2024
1 parent 861214d commit b401ec5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ jobs:
run: dotnet test --no-build --configuration Release --verbosity normal

- name: Publish Package to Nuget
if: github.event_name != 'pull_request'
run: |
rm -rf nuget/
dotnet pack --no-build --configuration Release --property:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} --output nuget
dotnet nuget push nuget/*.nupkg -k '${{ secrets.NUGET_API_KEY }}' --skip-duplicate -s https://api.nuget.org/v3/index.json
- name: Create Release
if: github.event_name != 'pull_request'
id: create_release
uses: actions/create-release@latest
env:
Expand Down

0 comments on commit b401ec5

Please sign in to comment.