From 95b20f3cb805b2a5a659e818e08ab5ad5690d900 Mon Sep 17 00:00:00 2001 From: Jannik S <69747628+jannikstdl@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:45:47 +0100 Subject: [PATCH] feat: show latest changes in releases This should show the latest Changes in the CHANGELOG.md file when creating a new release. For now it only shows "Automatically created new release". It is running 'awk '/^## [/{n++} n==1' CHANGELOG.md' which extracts the latest changes. Note: I only tested the command on my linux machine, worked. --- .github/workflows/build-release.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index fa3fa296d..e45a83164 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -19,24 +19,34 @@ jobs: echo "No changes to package.json" exit 1 } - + - name: Get version number from package.json id: get_version run: | VERSION=$(jq -r '.version' package.json) echo "::set-output name=version::$VERSION" + - name: Extract latest CHANGELOG entry + id: changelog + run: | + CHANGELOG_CONTENT=$(awk '/^## \[/{n++} n==1' CHANGELOG.md) + echo "CHANGELOG_CONTENT<