Skip to content

Commit

Permalink
ci: update NuGet publishing workflow to use new API key secret
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmet-cetinkaya committed May 9, 2024
1 parent ce5968d commit 5926517
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Restore NuGet packages
run: dotnet restore

- name: Build and publish NuGet package
env:
NUGET_PUBLISHER_TOKEN: ${{ secrets.NUGET_PUBLISHER_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet build --no-restore
nuget push -ApiKey $NUGET_PUBLISHER_TOKEN -Source https://www.nuget.org/api/v2/package -Verbosity Detailed
- name: Clean up
run: rm -rf bin
dotnet restore
dotnet build --configuration Release
dotnet pack --configuration Release --no-build
dotnet nuget push **/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
dotnet clean

0 comments on commit 5926517

Please sign in to comment.