Skip to content

Commit

Permalink
Stop auto-release changelogs from being too huge
Browse files Browse the repository at this point in the history
  • Loading branch information
interfect committed May 10, 2022
1 parent 99aab88 commit bc33b97
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/release-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,21 @@ jobs:
PREVIOUS_RELEASE_TAG=$(git tag --list iceraven-* --sort=-creatordate | tail -n+2 | head -n 1)
echo "## Automated release of version ${{ github.event.ref }} browser" >>temp_changelog.md
echo "<details>" >>temp_changelog.md
echo "<summary>Click to expand</summary>" >>temp_changelog.md
echo " " >>temp_changelog.md
echo "This is an automated release, consisting of the following changes:" >>temp_changelog.md
echo "### Change log (commit history since previous release)" >>temp_changelog.md
echo " " >>temp_changelog.md
git log ${{ github.event.ref }}...$PREVIOUS_RELEASE_TAG --pretty='format:%C(auto)%h (%as) %s' >>temp_changelog.md
echo " " >>temp_changelog.md
echo " " >>temp_changelog.md
echo "</details>" >>temp_changelog.md
if [[ "$(git log | grep $PREVIOUS_RELEASE_TAG | wc -l)" != "0" ]] ; then
# There's a path from the previous release to now
echo "<details>" >>temp_changelog.md
echo "<summary>Click to expand</summary>" >>temp_changelog.md
echo " " >>temp_changelog.md
echo "This is an automated release, consisting of the following changes:" >>temp_changelog.md
echo "### Change log (commit history since previous release)" >>temp_changelog.md
echo " " >>temp_changelog.md
git log ${{ github.event.ref }}...$PREVIOUS_RELEASE_TAG --pretty='format:%C(auto)%h (%as) %s' | head -n 1000 >>temp_changelog.md
echo " " >>temp_changelog.md
echo " " >>temp_changelog.md
echo "</details>" >>temp_changelog.md
else
echo "This is an automated release, not directly descended from the previous release." >>temp_changelog.md
fi
echo "**NOTE**: @fork-maintainers, you can edit these auto-generated release notes with a more user-friendly summary of the key changes, if needed." >>temp_changelog.md
echo " " >>temp_changelog.md
Expand Down

0 comments on commit bc33b97

Please sign in to comment.