From e08cec8fb6e4fbe864f1d5b7288cbedfa2a35e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rare=C8=99=20Cosma?= Date: Mon, 7 Oct 2024 14:06:25 +0300 Subject: [PATCH] cliff: reverse commits + pass notes as file --- .github/workflows/release.yml | 3 ++- cliff.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 012f9b2..27cb6a8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,10 +40,11 @@ jobs: args: --latest --strip all env: REPO_PREFIX: ${{ github.server_url }}/${{ github.repository }}/ + OUTPUT: release-notes.md - name: Create GitHub release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release create $VERSION --draft --verify-tag --title $VERSION --notes "${{ steps.git-cliff.outputs.content }}" + run: gh release create $VERSION --draft --verify-tag --title $VERSION -F release-notes.md - name: Push to CI branch env: GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} diff --git a/cliff.toml b/cliff.toml index 75f6e8c..37242f2 100644 --- a/cliff.toml +++ b/cliff.toml @@ -15,7 +15,7 @@ body = """ {% endif %}\ {% for group, commits in commits | group_by(attribute="group") %} ### {{ group | upper_first }} - {% for commit in commits %} + {% for commit in commits | reverse %} - {{ commit.message | split(pat="\n") | first | trim }} [#{{ commit.id | truncate(length=7, end="") }}]({{repo_prefix}}commit/{{ commit.id }})\ {% endfor %} {% endfor %}\n