Skip to content

Commit 302c35d

Browse files
jakeschepisclaude
andcommitted
chore: release notes pulled from CHANGELOG.md automatically
- release.yml: extract matching version block from CHANGELOG as release body - release.md rule: require summary + categorised sections in every CHANGELOG entry - CHANGELOG: add summary sentence to v0.2.0 entry - v0.2.0 GitHub Release: patched with full description Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 10edf76 commit 302c35d

3 files changed

Lines changed: 47 additions & 8 deletions

File tree

.claude/rules/release.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,36 @@ Semver: `vMAJOR.MINOR.PATCH`
3737
- New command → MINOR (`v0.2.0`)
3838
- Breaking flag/output change → MAJOR (`v1.0.0`)
3939

40-
Steps:
41-
1. Move `[Unreleased]` items in `CHANGELOG.md` to the new version + date
42-
2. `git commit -m "chore: release v0.2.0"`
43-
3. `git tag -a v0.2.0 -m "Release v0.2.0"` — annotated tags only, never lightweight
44-
4. `git push origin v0.2.0`
40+
### CHANGELOG.md format
4541

46-
GitHub Actions then builds 5 platform binaries and publishes the GitHub Release automatically.
42+
The CHANGELOG entry becomes the GitHub Release description automatically — write it well.
43+
Each version block must have:
44+
- A one or two sentence **summary** at the top describing what this release is about
45+
- `### Added` — new commands, features, endpoints
46+
- `### Fixed` — bug fixes
47+
- `### Security` — any security improvements (if applicable)
48+
- `### Changed` — breaking changes or behaviour changes (if applicable)
4749

48-
> Never push a tag without updating CHANGELOG.md first.
50+
Example:
51+
```markdown
52+
## [0.3.0] - 2026-03-01
53+
54+
This release adds budget reporting commands and improves error messages across all commands.
55+
56+
### Added
57+
- `xero reports budget-summary` — compare actuals vs budget by org
58+
- `xero reports budget-variance` — line-by-line variance report
59+
60+
### Fixed
61+
- Auth refresh no longer silently fails when instance_token is missing
62+
```
63+
64+
### Steps
65+
1. Write `CHANGELOG.md` entry with summary + categorised changes (see format above)
66+
2. `git commit -m "chore: release v0.3.0"`
67+
3. `git tag -a v0.3.0 -m "Release v0.3.0"` — annotated tags only, never lightweight
68+
4. `git push origin v0.3.0`
69+
70+
GitHub Actions extracts the CHANGELOG entry and uses it as the release description, then builds 5 platform binaries automatically.
71+
72+
> Never push a tag without a well-written CHANGELOG entry first.

.github/workflows/release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,32 @@ jobs:
1515
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
18+
1819
- uses: actions/setup-go@v5
1920
with:
2021
go-version: '1.23'
2122
cache: true
23+
24+
- name: Extract release notes from CHANGELOG.md
25+
id: changelog
26+
run: |
27+
VERSION="${{ github.ref_name }}"
28+
VERSION_NUM="${VERSION#v}"
29+
NOTES=$(awk "/^## \[${VERSION_NUM}\]/{found=1; next} /^## \[/{if(found) exit} found{print}" CHANGELOG.md)
30+
echo "notes<<EOF" >> $GITHUB_OUTPUT
31+
echo "$NOTES" >> $GITHUB_OUTPUT
32+
echo "EOF" >> $GITHUB_OUTPUT
33+
2234
- name: Build release binaries
2335
env:
2436
CLIENT_ID: ${{ secrets.XERO_CLIENT_ID }}
2537
PROXY_URL: ${{ secrets.PROXY_URL }}
2638
run: |
2739
chmod +x scripts/release.sh
2840
./scripts/release.sh ${{ github.ref_name }}
41+
2942
- name: Create GitHub Release
3043
uses: softprops/action-gh-release@v2
3144
with:
3245
files: dist/*
33-
generate_release_notes: true
46+
body: ${{ steps.changelog.outputs.notes }}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [0.2.0] - 2026-02-20
1111

12+
This release introduces the Cloudflare Worker auth proxy, which removes the Xero `client_secret` from the CLI binary entirely. Authentication is now gated through the Zeus Electron app — users cannot run `xero auth login` directly without being authorised through Zeus first.
13+
1214
### Added
1315
- Cloudflare Worker auth proxy (`worker/`) — `client_secret` now lives exclusively in Cloudflare, never in the CLI binary
1416
- Session token gating: `xero auth login` can only be initiated through the Zeus Electron app (requires `ZEUS_SESSION_TOKEN` env var set by Zeus)

0 commit comments

Comments
 (0)