Skip to content

Commit 2985167

Browse files
committed
ci: restore conventional-commit release notes with contributors
PR #136 replaced the custom release-notes.mjs script with ncipollo/release-action's generateReleaseNotes, which relies on PR labels that nobody applies — resulting in empty release notes. Restore the script that parses conventional commit prefixes (feat, fix, etc.) directly from git log, groups them into Features & Polish / Fixes / Misc buckets with collapsible details, and appends a Contributors section with first-time contributor welcome. Wire it into the publish-release job: preface + script output → RELEASE_BODY.md, replacing generateReleaseNotes.
1 parent 5b79730 commit 2985167

4 files changed

Lines changed: 639 additions & 53 deletions

File tree

.github/release.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1+
# Release notes are generated by scripts/release-notes.mjs which parses
2+
# conventional commit prefixes (feat, fix, etc.) from git history.
3+
# This file is kept as a fallback for GitHub's auto-generated notes only.
14
changelog:
25
change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
3-
categories:
4-
- title: Highlights
5-
labels:
6-
- feat
7-
- feature
8-
- enhancement
9-
- title: Fixes
10-
labels:
11-
- fix
12-
- bug
13-
- regression
14-
- title: Docs and DX
15-
labels:
16-
- docs
17-
- dx
186
exclude:
197
labels:
20-
- skip-release-notes
21-
- ci
22-
- chore
8+
- skip-release-notes

.github/workflows/build.yml

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -399,38 +399,6 @@ jobs:
399399
exit 1
400400
fi
401401
402-
- name: Resolve release notes base tag
403-
id: release_notes_base
404-
env:
405-
TAG: ${{ steps.release_meta.outputs.tag }}
406-
run: |
407-
set -euo pipefail
408-
409-
previous_ancestor_tag=""
410-
if git rev-parse --verify "${TAG}^{tag}" >/dev/null 2>&1 || git rev-parse --verify "${TAG}^{commit}" >/dev/null 2>&1; then
411-
previous_ancestor_tag="$(git describe --tags --abbrev=0 --match 'v*' "${TAG}^" 2>/dev/null || true)"
412-
fi
413-
414-
previous_tag="$previous_ancestor_tag"
415-
if printf '%s' "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
416-
previous_stable_tag=""
417-
while IFS= read -r candidate; do
418-
if [ "$candidate" = "$TAG" ]; then
419-
break
420-
fi
421-
previous_stable_tag="$candidate"
422-
done < <(git tag -l 'v*' --sort=v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' || true)
423-
424-
first_release_tag="$(git tag -l 'v*' --sort=v:refname | head -n 1 || true)"
425-
previous_tag="${previous_stable_tag:-$first_release_tag}"
426-
fi
427-
428-
if [ "$previous_tag" = "$TAG" ]; then
429-
previous_tag=""
430-
fi
431-
432-
echo "previous_tag=$previous_tag" >> "$GITHUB_OUTPUT"
433-
434402
- name: Collect release assets
435403
run: |
436404
set -euo pipefail
@@ -504,6 +472,16 @@ jobs:
504472
printf '> Desktop builds are in beta. The CLI + Web Console is the recommended install method.\n\n'
505473
} > RELEASE_PREFACE.md
506474
475+
- name: Generate release notes body
476+
env:
477+
GH_REPO: ${{ github.repository }}
478+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
479+
TAG: ${{ steps.release_meta.outputs.tag }}
480+
run: |
481+
set -euo pipefail
482+
node scripts/release-notes.mjs "$TAG" > RELEASE_CHANGES.md
483+
cat RELEASE_PREFACE.md RELEASE_CHANGES.md > RELEASE_BODY.md
484+
507485
- name: Resolve release options
508486
id: release_options
509487
env:
@@ -544,9 +522,7 @@ jobs:
544522
with:
545523
tag: ${{ steps.release_meta.outputs.tag }}
546524
name: ClawMaster ${{ steps.release_meta.outputs.tag }}
547-
bodyFile: RELEASE_PREFACE.md
548-
generateReleaseNotes: true
549-
generateReleaseNotesPreviousTag: ${{ steps.release_notes_base.outputs.previous_tag }}
525+
bodyFile: RELEASE_BODY.md
550526
artifacts: release-assets/*
551527
artifactErrorsFailBuild: true
552528
allowUpdates: true

0 commit comments

Comments
 (0)