Skip to content

Commit

Permalink
feat: add ci & cd integration
Browse files Browse the repository at this point in the history
  • Loading branch information
brunograna committed Feb 19, 2024
1 parent 8e15df9 commit 18f7d43
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,24 @@ jobs:
minor=$(echo "$last_tag" | cut -d. -f2)
patch=$(echo "$last_tag" | cut -d. -f3)
has_feat=false
while IFS= read -r line; do
subject=$(echo "$line" | cut -d' ' -f2-) # Extract the commit subject
case "$subject" in
has_breaking_change=false
git log --pretty=format:"%s" ${{ steps.previous_tag.outputs.previous_tag }}..${{ steps.version.outputs.new_version }} | \
while read line; do
case "$line" in
*'feat:'*)
echo "has_feat to true because of [$subject]"
has_feat=true
;;
*'fix:'*)
echo "patch incremented because of [$subject]"
patch=$((patch + 1))
;;
*'BREAKING CHANGE:'*)
echo "has_breaking_change to true because of [$subject]"
has_breaking_change=true
;;
*)
echo "no pattern matched, patch incremented because of [$subject]"
patch=$((patch + 1))
;;
esac
done < <(git log --pretty=format:"%h %s" "$commit_range")
done
if [ "$has_breaking_change" = true ]; then
major=$((major + 1))
minor=0
Expand Down

0 comments on commit 18f7d43

Please sign in to comment.