diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c548fac..4ae6a3d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -86,8 +86,7 @@ jobs: patch=$(echo "$last_tag" | cut -d. -f3) has_feat=false has_breaking_change=false - git log --pretty=format:"%s" ${{ steps.previous_tag.outputs.previous_tag }}..${{ steps.version.outputs.new_version }} | \ - while read line; do + while IFS= read -r line; do case "$line" in *'feat:'*) echo "has_feat=true because of [$line]" @@ -101,7 +100,7 @@ jobs: echo "not feat not breaking change, commit -> [$line]" ;; esac - done + done < <(git log --pretty=format:"%s" "$commit_range") if [ "$has_breaking_change" = true ]; then major=$((major + 1)) minor=0 @@ -116,6 +115,7 @@ jobs: echo "NEW VERSION SHOULD BE => $new_version" echo "::set-output name=new_version::$new_version" + - name: Create new tag id: new_tag