From c3398f8995fd7e974edc2d24b58ccbd1b2139ed9 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 17 Jul 2021 13:02:16 +0530 Subject: Skip bumping of app version if there are no other changes in a scheduled build. --- .github/workflows/dependency-updates.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml index cd06b8392..eb1fb56f2 100644 --- a/.github/workflows/dependency-updates.yml +++ b/.github/workflows/dependency-updates.yml @@ -63,8 +63,9 @@ jobs: git config user.name github-actions git config user.email github-actions@github.com git commit -am "Update submodules, browserslist data updates and linter fixes [skip ci]" --no-verify || true - - name: Bump version number if this is a scheduled build or has been manually triggered with 'version bump' in the text, then bump the version number - if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, 'version bump')) }} + echo "CHANGES_COUNT=$(git diff --shortstat @{u} | wc -l)" + - name: Bump version number if this is a scheduled build with changes or has been manually triggered with 'version bump' in the text, then bump the version number + if: ${{ (github.event_name == 'schedule' && env.CHANGES_COUNT != '0') || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, 'version bump')) }} run: npm version prerelease --preid=nightly - name: Push all changes run: git push origin ${{ env.GIT_BRANCH_NAME }} --no-verify -- cgit v1.2.3-54-g00ecf