From 175dbb608333c23de56a6479f3382e1c08ecf7e7 Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Tue, 8 Sep 2020 12:39:16 -0600 Subject: [PATCH] chore: move if statements into bash statement --- action.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 6af9810..0d58a3f 100644 --- a/action.yml +++ b/action.yml @@ -40,14 +40,22 @@ runs: shell: bash - run: npm i shell: bash - - run: npm test + - run: | + if [ "${{ inputs.skip_test }}" = "true" ]; then + echo "Skipping npm test" + else + npm test + fi shell: bash - if: ${{ inputs.skip_test }} - run: npm version ${{ inputs.newversion }} shell: bash - - run: git push --follow-tags + - run: | + if [ "${{ inputs.push_version_commit }}" = "true" ]; then + git push --follow-tags + else + echo "Skipping git push --follow-tags" + fi shell: bash - if: ${{ inputs.push_version_commit }} - run: ${{ inputs.publish_cmd }} shell: bash env: