From c3831ff5ac65347d693225b427d1b7e69568d801 Mon Sep 17 00:00:00 2001 From: Daniel Dimitrov Date: Mon, 24 Jun 2024 12:20:05 +0200 Subject: [PATCH] Chore: remove bump PRs from changelog (#178) 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 --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8bb37e88..e7ff3de8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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