make pushing optional

This commit is contained in:
Kevin Mahoney 2021-07-13 15:38:26 -06:00
parent b388649135
commit c9f74f6081
2 changed files with 9 additions and 0 deletions

View File

@ -50,6 +50,10 @@ inputs:
description: 'Set a custom commit message for version bump commit'
default: ''
required: false
push:
description: 'Set to false to skip pushing the new tag'
default: 'true'
required: false
outputs:
newTag:
description: 'The newly created tag'

View File

@ -105,6 +105,11 @@ Toolkit.run(async (tools) => {
return;
}
// case: if user sets push == false
if ( process.env['INPUT_PUSH'] === "false" ) {
return;
}
// GIT logic
try {
const current = pkg.version.toString();