File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ export async function publish(args) {
238238 let cmd = `git tag -a ${ packageJson . version } -m "Published ${ packageJson . version } "` ;
239239
240240 // set username and email for git
241- const gitUserName = process . env . GIT_USER_NAME || 'Needle Npm Publish' ;
241+ const gitUserName = process . env . GITHUB_ACTOR || process . env . GIT_USER_NAME || 'Needle Npm Publish' ;
242242 const gitUserEmail = process . env . GIT_USER_EMAIL || 'hi+git@needle.tools' ;
243243 cmd = `git config user.name "${ gitUserName } " && git config user.email "${ gitUserEmail } " && ${ cmd } ` ;
244244
@@ -247,7 +247,13 @@ export async function publish(args) {
247247 cwd : packageDirectory ,
248248 env : env
249249 } ) ;
250- if ( ! res . success ) {
250+ if ( res . success ) {
251+ logger . info ( `✅ Successfully created git tag: ${ packageJson . version } ` ) ;
252+ if ( webhook ) {
253+ await sendMessageToWebhook ( webhook , `✅ **Created git tag** \`${ packageJson . version } \` for package \`${ packageJson . name } \`` ) ;
254+ }
255+ }
256+ else {
251257 logger . error ( `❌ Failed to create git tag: ${ res . error } ` ) ;
252258 if ( webhook ) {
253259 await sendMessageToWebhook ( webhook , `❌ **Failed to create git tag** \`${ packageJson . version } \`:\n\`\`\`\n${ res . error } \n\`\`\`` ) ;
You can’t perform that action at this time.
0 commit comments