Skip to content

Commit 2fb2520

Browse files
committed
Update nuget-push-to-production.yml
1 parent d31cf53 commit 2fb2520

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/nuget-push-to-production.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: dotnet nuget add source ${{ secrets.ESDM_NUGET_HOSTED_URL }} -u ${{ secrets.NUGET_USERNAME }} -p ${{ secrets.NUGET_PASSWORD }} --store-password-in-clear-text --name esdm-nuget-hosted
3131
- name: Find and Push NuGet packages to Nexus
3232
run: |
33-
PACKAGES=$(find . -name "*.nupkg" | grep -E "cloudscribe|sts\.Common")
33+
PACKAGES=$(find . -name "*.nupkg" | grep -E "cloudscribe|sts\.")
3434
if [ -z "$PACKAGES" ]; then
3535
echo "No matching package found. Exiting."
3636
exit 1
@@ -41,6 +41,8 @@ jobs:
4141
dotnet nuget push "$PACKAGE" --source esdm-nuget-hosted --skip-duplicate || echo "WARNING - skipping duplicate package: $PACKAGE"
4242
done
4343
- name: Find and Push NuGet packages to nuget.org
44+
env:
45+
NUGET_ORG_API_KEY: ${{ secrets.NUGET_ORG_API_KEY }}
4446
run: |
4547
PACKAGES=$(find . -name "*.nupkg" | grep -E "cloudscribe|sts\.Common")
4648
if [ -z "$PACKAGES" ]; then
@@ -50,5 +52,5 @@ jobs:
5052
echo "Found packages: $PACKAGES"
5153
for PACKAGE in $PACKAGES; do
5254
echo "Pushing $PACKAGE to nuget.org"
53-
dotnet nuget push "$PACKAGE" --api-key "$NUGET_ORG_API_KEY" --source "https://api.nuget.org/v3/index.json" --skip-duplicate || echo "WARNING - failed to upload package: $PACKAGE"
55+
dotnet nuget push "$PACKAGE" --api-key "$NUGET_ORG_API_KEY" --source "https://api.nuget.org/v3/index.json" --skip-duplicate || { echo "WARNING - failed to upload package: $PACKAGE"; exit 1; }
5456
done

0 commit comments

Comments
 (0)