Skip to content

Commit d00f0d8

Browse files
committed
Fix duplicate NuGet publish detection
1 parent 3c717b3 commit d00f0d8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,18 @@ jobs:
100100
echo "$RESULT"
101101
OUTPUT="$OUTPUT$RESULT"
102102
103-
if [ $EXIT_CODE -eq 0 ]; then
103+
if echo "$RESULT" | grep -qi "already exists"; then
104+
echo "Package already exists, skipping..."
105+
elif [ $EXIT_CODE -eq 0 ]; then
104106
echo "Successfully published $package"
105107
PUBLISHED=true
106-
elif echo "$RESULT" | grep -q "already exists"; then
107-
echo "Package already exists, skipping..."
108108
else
109109
echo "Failed to publish $package"
110110
exit 1
111111
fi
112112
done
113113
114-
if [ "$PUBLISHED" = true ] || echo "$OUTPUT" | grep -q "Your package was pushed"; then
114+
if [ "$PUBLISHED" = true ]; then
115115
echo "published=true" >> $GITHUB_OUTPUT
116116
echo "At least one package was successfully published"
117117
else

0 commit comments

Comments
 (0)