From bb46ba7c9222d933d1420d8e53bb81930de4960c Mon Sep 17 00:00:00 2001 From: Claudia Date: Wed, 25 Feb 2026 17:27:21 +0000 Subject: [PATCH] ci: use git-cliff for nightly notes, dedup duplicate entries - Switch nightly release notes from raw git log grep to git-cliff, matching the grouped ### Fixed / ### Added format of stable releases - Pipe both nightly and stable output through awk to deduplicate identical lines (prevents the same commit message appearing twice when a PR has multiple commits with the same subject) --- .github/workflows/build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28f2b38..272b2a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -169,15 +169,13 @@ jobs: # Generate checksums cd assets && sha256sum * > checksums.txt 2>/dev/null || true - # Generate release notes + # Generate release notes via git-cliff (nightly and stable) cd .. if [ "$IS_NIGHTLY" = "true" ]; then LAST_TAG=$(git tag --list "nightly-*" --sort=-version:refname | head -1) if [ -n "$LAST_TAG" ]; then - git log "$LAST_TAG"..HEAD --oneline --no-merges --first-parent | \ - grep -Ei '^[a-f0-9]+ (feat|fix|perf|security)(\([^)]+\))?:' | \ - grep -Eiv '^[a-f0-9]+ fix\((test|ci|build|chore|docs|style|refactor)\):' | \ - sed 's/^/- /' > notes.md + npx git-cliff@latest "$LAST_TAG"..HEAD --strip all > notes.md.tmp || true + awk '!seen[$0]++' notes.md.tmp > notes.md && rm -f notes.md.tmp [ -s notes.md ] || echo "- No user-facing changes" > notes.md else echo "Initial nightly build" > notes.md @@ -185,7 +183,8 @@ jobs: else PREV_TAG=$(git tag --list "v[0-9]*" --sort=-version:refname | grep -v "v${VERSION}" | head -1) npx git-cliff@latest ${PREV_TAG:+"$PREV_TAG"..HEAD} --tag "v${VERSION}" \ - --ignore-tags "nightly-.*" --strip all > notes.md || true + --ignore-tags "nightly-.*" --strip all > notes.md.tmp || true + awk '!seen[$0]++' notes.md.tmp > notes.md && rm -f notes.md.tmp if [ ! -s notes.md ]; then echo "See [CHANGELOG.md](https://github.com/Orinks/PortkeyDrop/blob/main/CHANGELOG.md) for full release notes." > notes.md fi