diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5ebf10d6..a255baf3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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" \