Skip to content

Commit

Permalink
infra: Auto-release - Fix empty changes throwing an error (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
WarningImHack3r authored Oct 24, 2023
1 parent a353f3d commit fb18c6a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ jobs:
echo version=$(node -pe "require('./package.json').version") >> $GITHUB_OUTPUT
# Get all changes & authors of commits since last release, excluding merge commits and commits from dependabot or renovate
IFS=$'\n' changes=($(git log $latest_tag..HEAD --pretty="%s" --no-merges --perl-regexp --author='^((?!dependabot\[bot\]|renovate).*)$'))
IFS=$'\n' authors=($(git log $latest_tag..HEAD --pretty="%ae" --no-merges --perl-regexp --author='^((?!dependabot\[bot\]|renovate).*)$'))
IFS=$'\n' changes=($(git log $latest_tag..HEAD --pretty="%s" --no-merges --perl-regexp --author='^((?!dependabot\[bot\]|renovate\[bot\]).*)$'))
IFS=$'\n' authors=($(git log $latest_tag..HEAD --pretty="%ae" --no-merges --perl-regexp --author='^((?!dependabot\[bot\]|renovate\[bot\]).*)$'))
# If there are no changes, set changelog as "_No changes_" and exit
if [ ${#changes[@]} -eq 0 ]; then
echo "Changelog: No changes"
echo changelog="_No changes_" >> $GITHUB_OUTPUT
exit 0
fi
# Map author emails to GitHub usernames in a map
declare -A author_map
Expand Down

0 comments on commit fb18c6a

Please sign in to comment.