Skip to content

Commit 083b1ed

Browse files
vedxyzamondnet
authored andcommitted
safer assignment
1 parent ce607f0 commit 083b1ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ async function run() {
425425
core.debug(`The head commit is: ${commit}`);
426426
}
427427
} else if (context.eventName === 'release') {
428-
const tagName = context.payload.release.tag_name;
429-
ref = `refs/tags/${tagName}`;
428+
const tagName = context.payload.release?.tag_name;
429+
ref = !tagName ? ref : `refs/tags/${tagName}`;
430430
core.debug(`The release ref is: ${ref}`);
431431
}
432432

0 commit comments

Comments
 (0)