Skip to content

Commit

Permalink
Correção no publish de pacotes nuget
Browse files Browse the repository at this point in the history
  • Loading branch information
mirandaasm committed Jan 15, 2025
1 parent a6768b6 commit 3b7d37d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/publish-nuget-on-new-version-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,17 @@ jobs:
- name: Publish to NuGet.org
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
shell: pwsh
run: |
for %f in (artifacts\*.nupkg) do nuget push "%f" -Source "https://api.nuget.org/v3/index.json" -ApiKey $NUGET_API_KEY -SkipDuplicate
$files = Get-ChildItem -Path artifacts -Filter *.nupkg
if ($files.Count -eq 0) {
Write-Error "No .nupkg files found in the artifacts directory."
exit 1
}
foreach ($file in $files) {
Write-Host "Publishing $file.FullName"
nuget push $file.FullName -Source "https://api.nuget.org/v3/index.json" -ApiKey $env:NUGET_API_KEY -SkipDuplicate
}
# Create a GitHub release
- name: Create GitHub Release
Expand Down

0 comments on commit 3b7d37d

Please sign in to comment.