Skip to content

Commit 17e4a8c

Browse files
ThomasK33claude
andcommitted
ci: add AI release-notes automation via communique
On every published release, generate editorialized GitHub release notes with communique (github.com/jdx/communique) and overwrite the release body. communique is provisioned through mise (pinned in mise.toml + mise.lock) and run with `claude-opus-4-8`; communique.toml supplies the project context and tone. The workflow installs only communique via mise-action's install_args and disables the action cache to avoid zizmor's cache-poisoning finding on this publish-triggered, contents:write job. Change-Id: I063f570031346fb1fffc0b402d37edd20a1d8782 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 781f3ab commit 17e4a8c

4 files changed

Lines changed: 118 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Release Notes
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release-notes:
13+
name: release-notes
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Validate release inputs
17+
env:
18+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
RELEASE_TAG: ${{ github.event.release.tag_name }}
21+
run: |
22+
set -euo pipefail
23+
24+
: "${ANTHROPIC_API_KEY:?ANTHROPIC_API_KEY secret is required}"
25+
: "${GITHUB_TOKEN:?GITHUB_TOKEN is required}"
26+
: "${RELEASE_TAG:?release tag is required}"
27+
28+
case "$RELEASE_TAG" in
29+
v*) ;;
30+
*)
31+
echo "release tag must start with 'v': $RELEASE_TAG" >&2
32+
exit 1
33+
;;
34+
esac
35+
36+
- name: Checkout
37+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
with:
39+
fetch-depth: 0
40+
fetch-tags: true
41+
persist-credentials: false
42+
43+
# install_args installs only communique (pinned in mise.toml), not the
44+
# full dev toolchain. cache: false avoids zizmor's cache-poisoning finding
45+
# on this publish workflow (caching saves little on a release-only job).
46+
- name: Set up mise
47+
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
48+
with:
49+
install_args: communique
50+
cache: false
51+
52+
- name: Resolve previous release ref
53+
env:
54+
RELEASE_TAG: ${{ github.event.release.tag_name }}
55+
run: |
56+
set -euo pipefail
57+
58+
release_commit="$(git rev-parse --verify "${RELEASE_TAG}^{commit}")"
59+
: "${release_commit:?release commit is required}"
60+
61+
if previous_ref="$(git describe --tags --abbrev=0 --match 'v[0-9]*.[0-9]*.[0-9]*' --exclude '*-*' "${release_commit}^" 2>/dev/null)"; then
62+
echo "Previous release tag: $previous_ref"
63+
else
64+
previous_ref="$(git rev-list --max-parents=0 "$release_commit" | head -n 1)"
65+
: "${previous_ref:?previous release ref is required}"
66+
echo "No previous release tag found; using root commit: $previous_ref"
67+
fi
68+
69+
echo "PREVIOUS_RELEASE_REF=$previous_ref" >> "$GITHUB_ENV"
70+
71+
- name: Generate GitHub release notes
72+
env:
73+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
RELEASE_TAG: ${{ github.event.release.tag_name }}
76+
run: |
77+
set -euo pipefail
78+
79+
: "${PREVIOUS_RELEASE_REF:?previous release ref is required}"
80+
81+
communique generate "$RELEASE_TAG" "$PREVIOUS_RELEASE_REF" \
82+
--github-release --repo "${{ github.repository }}"

communique.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
context = """
2+
claudecode.nvim is a Neovim plugin written in pure Lua with zero dependencies. It implements the same WebSocket-based MCP protocol as Anthropic's official IDE extensions, letting the Claude CLI drive Neovim: opening files, reading selections and diagnostics, showing native diffs, and managing terminal sessions.
3+
4+
Releases matter to Neovim users who install the plugin via their package manager and to integrators relying on MCP tool behavior. Call out changes to the public setup() configuration (such as terminal or diff_opts), MCP tool behavior and compatibility with the VS Code extension, supported Neovim versions, file explorer and terminal integrations (snacks.nvim, native, external, nvim-tree, oil.nvim, neo-tree, mini.files), and any breaking changes to keybindings or commands.
5+
6+
Primary readers are Neovim users and plugin integrators, not the plugin's own maintainers, so frame notes around user-visible impact rather than internal refactors.
7+
"""
8+
9+
system_extra = """
10+
Write direct, practical release notes for Neovim users and integrators.
11+
Lead with what changed and why it matters.
12+
Group changes into clear sections (for example Features, Fixes, Breaking Changes) and keep them concise.
13+
Avoid marketing language.
14+
Provide concrete migration guidance when configuration options, commands, or MCP tool behavior changed.
15+
Do not invent changes that are not supported by the commits, pull requests, or diffs.
16+
"""
17+
18+
[defaults]
19+
model = "claude-opus-4-8"

mise.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mise.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ zizmor = "1.25.2"
5454
websocat = "1.14.1"
5555
jq = "1.8.1"
5656
fzf = "0.73.1"
57+
communique = "1.1.3"
5758

5859
[env]
5960
# Lua test rocks (busted/luacheck/luacov) live in a project-local tree that

0 commit comments

Comments
 (0)