Skip to content

Commit

Permalink
Merge pull request #222 from w-bonelli/fix-release
Browse files Browse the repository at this point in the history
ci: handle empty changelog in release automation
  • Loading branch information
jmccreight committed Jul 20, 2023
2 parents d138f23 + 107d18a commit e808451
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,14 @@ jobs:
run: |
version=$(cat version.txt | xargs)
title="pywatershed $version"
notes=$(cat "changelog/CHANGELOG_$version.md" | grep -v "### Version $version")
# don't fail if the changelog is empty
if [[ -s "changelog/CHANGELOG_$version.md" ]]; then
notes=$(cat "changelog/CHANGELOG_$version.md" | grep -v "### Version $version")
else
notes="No changes found, are recent commits conventional?"
fi
gh release create "$version" \
--target main \
--title "$title" \
Expand Down

0 comments on commit e808451

Please sign in to comment.