From 4759f616402c904ef2fdba9ed00e9292171abe00 Mon Sep 17 00:00:00 2001 From: Loong Date: Wed, 24 Jan 2024 20:04:50 +0800 Subject: [PATCH] ci: fix release notes generation (#185) --- .github/workflows/release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 825f1f71..7eeeadd3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,9 +79,10 @@ jobs: uses: orhun/git-cliff-action@v2 with: config: cliff.toml - # If the release is a prerelease, use unreleased commits - # otherwise use commits belonging to the last release - args: -vv ${{ fromJson(needs.meta.outputs.prerelease) && '-u' || '-l' }} + # If the release is triggered by a tag, process commits starting + # from the latest tag, otherwise tag will be create later, so use + # unreleased commits + args: -vv ${{ github.event_name == 'push' && '-l' || '-u' }} - name: Preview Release Notes if: ${{ !fromJson(needs.meta.outputs.publish) }} run: |