Sync changelogen with GitHub Releases
mainChangelogen can automatically sync your local CHANGELOG.md with GitHub releases using the gh release command. This parses the current CHANGELOG.md (checking local then remote) to create or update releases on GitHub.
Prerequisites:
- A valid
repositoryfield must exist inpackage.jsonORrepomust be set in.changelogenrc. - For automation, you must provide a GitHub token.
Authentication Methods:
- Environment Variables:
CHANGELOGEN_TOKENS_GITHUB,GITHUB_TOKEN, orGH_TOKEN. - CLI Argument:
--token <token>. - Global Config:
tokens.github=<token>in~/.changlogenrc. - GitHub CLI: Use an authenticated session via
gh auth login.
If unauthenticated, the tool will attempt to open a browser link for manual release.
npx changelogen@latest gh release [all|versions...] [--dir] [--token]