diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b4177791..42fb6d49a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -270,13 +270,18 @@ jobs: - name: Push create release commits run: | - git commit -am "Create ${{ needs.set-context.outputs.release_version }} release" - git push && git_exit_code=0 || git_exit_code=$? - if [ ${git_exit_code} -eq 0 ] ; then - echo " - ✅ commits pushed to ${{ needs.set-context.outputs.release_branch }}." + git diff --exit-code && diff=false || diff=true + if [ "${diff}" == "true" ] ; then + git commit -am "Create ${{ needs.set-context.outputs.release_version }} release" + git push && git_exit_code=0 || git_exit_code=$? + if [ ${git_exit_code} -eq 0 ] ; then + echo " - ✅ commits pushed to ${{ needs.set-context.outputs.release_branch }}." + else + echo " - ❌ A problem occurs when attempting to push create relase commits to ${{ needs.set-context.outputs.release_branch }} branch." + exit 1 + fi else - echo " - ❌ A problem occurs when attempting to push create relase commits to ${{ needs.set-context.outputs.release_branch }} branch." - exit 1 + echo " - ✅ no changes" fi - name: Archive artifacts