From c9f74f6081c4204d1f1637a6fd2447534762b698 Mon Sep 17 00:00:00 2001 From: Kevin Mahoney <716806+kevcube@users.noreply.github.com> Date: Tue, 13 Jul 2021 15:38:26 -0600 Subject: [PATCH] make pushing optional --- action.yml | 4 ++++ index.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/action.yml b/action.yml index 7d874a3..59c8979 100644 --- a/action.yml +++ b/action.yml @@ -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' diff --git a/index.js b/index.js index 5ad32ff..5427b4e 100644 --- a/index.js +++ b/index.js @@ -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();