From 8368cd8015b1b8f9b3fb046ad6d8474be460ffd5 Mon Sep 17 00:00:00 2001 From: bendtherules Date: Sat, 21 Mar 2026 17:58:00 +0530 Subject: [PATCH] fix: add OTP prompt for npm publish to enhance security --- scripts/release.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 24b628b..a9b02a8 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -30,8 +30,13 @@ if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then exit 0 fi -# Publish to npm -npm publish +# Prompt for OTP +read -p "Enter npm OTP (leave blank if not using 2FA): " otp +if [[ -n "$otp" ]]; then + npm publish --otp "$otp" +else + npm publish +fi # Push git commits and tags git push && git push --tags