From c1e98b06fb8fa65cd4976c7e6e101ee4f47888d5 Mon Sep 17 00:00:00 2001 From: Curtis Banh <30607061+cqbanh@users.noreply.github.com> Date: Tue, 16 May 2023 12:48:58 -0700 Subject: [PATCH 1/2] updated version commit condition --- .github/workflows/build.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 950e85aa..6af2ee40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,18 +137,16 @@ jobs: - name: Commit Version Bump # If building develop, a release branch, or main then we commit the version bump back to the repo - if: | - ${{ - ((github.ref == 'refs/heads/develop') || - (github.ref == 'refs/heads/main') || - (startsWith(github.ref, 'refs/heads/release'))) && - (github.event.inputs.allow_same_version != 'true') - }} run: | - git config --global user.name 'hitide-ui bot' - git config --global user.email 'hitide-ui@noreply.github.com' - git commit -am "/version ${{ env.THE_VERSION }}" - git push + if ${{ github.event.inputs.allow_same_version != 'true' && + (github.ref == 'refs/heads/develop' || + github.ref == 'refs/heads/main' || + startsWith(github.ref, 'refs/heads/release') }}; then + git config --global user.name 'hitide-ui bot' + git config --global user.email 'hitide-ui@noreply.github.com' + git commit -am "/version ${{ env.THE_VERSION }}" + git push + fi - name: Push Tag if: | From 9bdcc831beb0cef81d626c3ab0fb246bb380c382 Mon Sep 17 00:00:00 2001 From: Curtis Banh <30607061+cqbanh@users.noreply.github.com> Date: Tue, 16 May 2023 13:00:35 -0700 Subject: [PATCH 2/2] fixed syntax --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6af2ee40..1ec5e2a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -141,7 +141,7 @@ jobs: if ${{ github.event.inputs.allow_same_version != 'true' && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || - startsWith(github.ref, 'refs/heads/release') }}; then + startsWith(github.ref, 'refs/heads/release')) }}; then git config --global user.name 'hitide-ui bot' git config --global user.email 'hitide-ui@noreply.github.com' git commit -am "/version ${{ env.THE_VERSION }}"