Skip to content

Commit c93c3f5

Browse files
committed
ci(release): categorized GitHub-native release notes (install + download + What's Changed)
The mikepenz changelog builder relies on GitHub's compare API, which 404s ("no common ancestor") for this repo's tag range after the history rewrites, so it produced an empty changelog. Replace it with GitHub's native generated notes, which list merged PRs/issues without needing the compare merge-base: - Compose an install + download-table header (cargo-dist style, like the codeanalyzer-typescript release notes). - softprops/action-gh-release@v2 with generate_release_notes: true appends a categorized "What's Changed" section. - .github/release.yml groups PRs under emoji headings by label (Features, Fixes, Docs, Tests, Breaking, …), mirroring the old mikepenz categories. - Drop the unused mindsers/mikepenz steps and release_config.json.
1 parent 73e62a0 commit c93c3f5

3 files changed

Lines changed: 63 additions & 92 deletions

File tree

.github/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Configures GitHub's auto-generated release notes (the "What's Changed" section
2+
# appended by `generate_release_notes` in .github/workflows/release.yml). Merged
3+
# PRs are grouped under these emoji headings by label, mirroring the emoji
4+
# categories used by the codeanalyzer-typescript backend.
5+
changelog:
6+
exclude:
7+
authors:
8+
- dependabot
9+
- github-actions
10+
categories:
11+
- title: 🚀 Features
12+
labels: [enhancement, kind/feature]
13+
- title: 🐛 Fixes
14+
labels: [bug, fix]
15+
- title: ♻️ Refactoring
16+
labels: [refactoring]
17+
- title: ⚡️ Performance
18+
labels: [performance]
19+
- title: 📚 Documentation
20+
labels: [documentation, doc]
21+
- title: 🚦 Tests
22+
labels: [test]
23+
- title: 🚨 Breaking Changes
24+
labels: [breaking]
25+
- title: 🛠 Other Changes
26+
labels: ["*"]

.github/workflows/release.yml

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -87,40 +87,50 @@ jobs:
8787
echo "current_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
8888
shell: bash
8989

90-
- name: Read Changelog Entry
91-
id: changelog_reader
92-
uses: mindsers/changelog-reader-action@v2
93-
with:
94-
validation_level: warn
95-
version: ${{ steps.tag_name.outputs.current_version }}
96-
path: ./CHANGELOG.md
97-
98-
- name: Build changelog
99-
id: gen_changelog
100-
continue-on-error: true # auto-PR-diff is best-effort; CHANGELOG.md is the source of truth
101-
uses: mikepenz/release-changelog-builder-action@v5
102-
with:
103-
failOnError: "false"
104-
configuration: .github/workflows/release_config.json
90+
# cargo-dist-style notes: install one-liners + a download table. The categorized
91+
# "What's Changed" (merged PRs/issues grouped under emoji headings via
92+
# .github/release.yml) is appended by generate_release_notes below. Indented code
93+
# blocks avoid backticks in the heredoc.
94+
- name: Compose release notes header (install + download)
10595
env:
106-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
VERSION: ${{ steps.tag_name.outputs.current_version }}
97+
run: |
98+
REPO="codellm-devkit/codeanalyzer-python"
99+
BASE="https://github.com/$REPO/releases/download/v$VERSION"
100+
cat > "$RUNNER_TEMP/RELEASE_BODY.md" <<EOF
101+
## Install codeanalyzer-python v$VERSION
102+
103+
Shell script (installs the canpy CLI via uv / pipx / pip):
104+
105+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/$REPO/releases/latest/download/canpy-installer.sh | sh
106+
107+
PyPI:
108+
109+
pip install codeanalyzer-python==$VERSION
110+
111+
For the optional live Neo4j push (--emit neo4j --neo4j-uri ...):
112+
113+
pip install 'codeanalyzer-python[neo4j]==$VERSION'
114+
115+
## Download
116+
117+
| File | Description |
118+
| --- | --- |
119+
| [codeanalyzer_python-$VERSION-py3-none-any.whl]($BASE/codeanalyzer_python-$VERSION-py3-none-any.whl) | Python wheel |
120+
| [codeanalyzer_python-$VERSION.tar.gz]($BASE/codeanalyzer_python-$VERSION.tar.gz) | Source distribution |
121+
| [canpy-installer.sh]($BASE/canpy-installer.sh) | Shell installer (uv / pipx / pip) |
122+
| [schema.json]($BASE/schema.json) | Neo4j schema contract |
123+
EOF
124+
echo "----- composed header -----"; cat "$RUNNER_TEMP/RELEASE_BODY.md"
107125
108126
- name: Publish release on GitHub
109-
uses: softprops/action-gh-release@v1
127+
uses: softprops/action-gh-release@v2
110128
with:
111129
files: |
112130
dist/*
113131
release-assets/*
114-
body: |
115-
## Release Notes (from CHANGELOG.md)
116-
117-
${{ steps.changelog_reader.outputs.changes }}
118-
119-
---
120-
121-
## Detailed Changes (auto-generated)
122-
123-
${{ steps.gen_changelog.outputs.changelog }}
132+
body_path: ${{ runner.temp }}/RELEASE_BODY.md
133+
generate_release_notes: true # appends categorized "What's Changed" (see .github/release.yml)
124134
env:
125135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126136

.github/workflows/release_config.json

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)