mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 09:45:36 +00:00
docs: keep a CHANGELOG.md, with one entry file per PR
Release notes were written by hand on GitHub at tag time, so the contents of a stacked release had to be pieced together from every PR, and output changes that scripts and agents rely on were easy to miss. - CHANGELOG.md backfills every published release (0.2.0 to 0.4.0) from its GitHub notes, verbatim. - A PR adds changes/unreleased/<branch-name>.md instead of editing CHANGELOG.md, so stacked PRs never conflict. changes/README.md gives the sections, including Output Changes for JSON, MCP and error-code changes. - scripts/changelog.sh: `check` validates entries and CHANGELOG.md, `release X.Y.Z` folds the entries into a new section (ordered by PR), and `notes X.Y.Z` prints a section as GitHub release notes. - The release workflow sets the GitHub notes from the tag's section. - New flake check `changelog` runs scripts/changelog-test.sh; both scripts are shellchecked. - Entries for 0.5.0: #73, #74, #75, #78, #79, #80, #81 and this PR. Claude-Session: https://claude.ai/code/session_01RqPPVeVDrnLoP7NUZmLRxY
This commit is contained in:
parent
84c3255716
commit
809966925e
21 changed files with 942 additions and 13 deletions
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
|
|
@ -100,11 +100,14 @@ jobs:
|
|||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Check out install script
|
||||
- name: Check out install script and changelog
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
with:
|
||||
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
|
||||
sparse-checkout: install.sh
|
||||
sparse-checkout: |
|
||||
install.sh
|
||||
CHANGELOG.md
|
||||
scripts/changelog.sh
|
||||
sparse-checkout-cone-mode: false
|
||||
path: src
|
||||
|
||||
|
|
@ -136,3 +139,22 @@ jobs:
|
|||
idx-mcp-darwin-x64
|
||||
SHA256SUMS
|
||||
src/install.sh
|
||||
|
||||
# The notes are the tag's CHANGELOG.md section. A tag from before
|
||||
# CHANGELOG.md (or without its version in it) keeps the notes it has.
|
||||
- name: Read release notes from CHANGELOG.md
|
||||
id: notes
|
||||
env:
|
||||
CHANGELOG_ROOT: src
|
||||
run: |
|
||||
if [ -f src/scripts/changelog.sh ] && bash src/scripts/changelog.sh notes "$RELEASE_TAG" > notes.md; then
|
||||
echo "found=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "::warning::${RELEASE_TAG} has no CHANGELOG.md section at that tag; release notes left unchanged"
|
||||
fi
|
||||
|
||||
- name: Publish release notes
|
||||
if: steps.notes.outputs.found == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh release edit "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --notes-file notes.md
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue