Skip to content

Commit

Permalink
Chore: remove bump PRs from changelog (#178)
Browse files Browse the repository at this point in the history
With this change bump PRs will be removed form the generated changelog.
For this to work the version number needs to be part of the commit title
  • Loading branch information
compojoom authored Jun 24, 2024
1 parent fda7f7a commit c3831ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
id: version
run: |
OLD_VERSION=$(git describe --tags --abbrev=0)
NEW_VERSION=v$(node -p 'require("./package.json").version')
NEW_VERSION_NUMBER_ONLY=$(node -p 'require("./package.json").version')
NEW_VERSION=v${NEW_VERSION_NUMBER_ONLY}
if [ $NEW_VERSION != $OLD_VERSION ]; then
echo "New version $NEW_VERSION detected"
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
git log "$OLD_VERSION"..HEAD --pretty=format:"* %s" > CHANGELOG.md
git log "$OLD_VERSION"..HEAD --pretty=format:"* %s" --invert-grep --grep="$NEW_VERSION_NUMBER_ONLY" > CHANGELOG.md
else
echo "Version $OLD_VERSION hasn't changed, skipping the release"
fi
Expand Down

0 comments on commit c3831ff

Please sign in to comment.