Skip to content

Commit d848734

Browse files
committed
Improves publish workflow output for already published versions
Updates deployment logic to append informative messages to the GitHub step summary when a version is already published, providing clearer feedback and avoiding abrupt workflow termination. Enhances visibility for skipped deployments.
1 parent 06b1d2c commit d848734

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ jobs:
2727
echo "Version: $VERSION"
2828
2929
if npm view "$NAME@$VERSION" version > /dev/null 2>&1; then
30-
echo "Version $VERSION of $NAME is already published on npm. Aborting."
31-
exit 1
30+
echo "### 🛑 Deployment aborted" >> $GITHUB_STEP_SUMMARY
31+
echo "Version $VERSION of $NAME is already published on npm." >> $GITHUB_STEP_SUMMARY
32+
echo "Skipping remaining steps." >> $GITHUB_STEP_SUMMARY
33+
exit 0
3234
else
3335
echo "Version $VERSION of $NAME is NOT published. Continuing workflow."
3436
fi

0 commit comments

Comments
 (0)