The regex used `\Z` for end-of-string, which JavaScript does not support
(it is treated as the literal character `Z`). When the requested version
had no subsequent section in CHANGELOG.md — i.e., the newest release,
which is the common case — the lookahead could never match, the regex
returned null, and publish.yml fell back to
"See CHANGELOG.md for release details." instead of the real body.
Rewritten as two separate matches: find the heading line, then read to
the next `^## ` heading or EOF. Verified locally:
- `0.1.0` → "Hello Helmor." (was "See CHANGELOG.md for release details.")
- non-existent version → correct fallback
- multi-section CHANGELOG → extracts the requested section in isolation