Skip to content

Commit

Permalink
Update BuildAndRelease.yml
Browse files Browse the repository at this point in the history
Add push check
  • Loading branch information
cwinland authored Oct 20, 2023
1 parent 972ca87 commit 97d920b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/BuildAndRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,14 @@ jobs:
- name: Creating a package
run: dotnet pack Wpf.NotificationCenter/Wpf.NotificationCenter.csproj --no-build -c Release -o . /p:PackageVersion=${{ env.VERSION }}

- name: Publish to Nuget
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate -n
- name: Push to NuGet
id: push
run: |
OUTPUT=$(dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate)
echo "$OUTPUT"
if [[ $OUTPUT == *"Your package was pushed"* ]]; then
echo "Push successful"
else
echo "Push failed"
exit 1
fi

0 comments on commit 97d920b

Please sign in to comment.