Skip to content

Commit

Permalink
OPL-12294: Prevent continuing nuget pushing when any of the pushes fa…
Browse files Browse the repository at this point in the history
…ils (use bash). (#13)
  • Loading branch information
jakubsemerak committed Mar 6, 2024
1 parent 933997f commit 33c4a42
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ jobs:
# Use --skip-duplicate to prevent errors if a package with the same version already exists.
# If you retry a failed workflow, already published packages will be skipped without error.
- name: Publish NuGet package
shell: bash
run: |
set -e
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
}
for file in $(find "${{ env.NuGetDirectory }}" -name '*.nupkg')
do
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
done

0 comments on commit 33c4a42

Please sign in to comment.