Skip to content
goreleaserPublic

About

chglog is a changelog management library and tool

Resources

Code of conduct

Stars

283 stars

Watchers

7 watching

Forks

Repository files navigation

GoReleaser Logo

chglog

chglog is a changelog management library and tool

Release Software License GitHub Actions Codecov branch Go Report Card Go Doc Powered By: GoReleaser

Why

While there are other tool out there that will create a changelog output as part of their workflow none of the ones I could find did so in a way that allowed formatting the output via multiple templates.

The need to multiple output formats was being driven by the desire to add changelog support to https://github.com/goreleaser/nfpm and the deb and rpm changelog formats not being the same.

Goals

  • be simple to use
  • provide decent default templates for deb, rpm, release and repository style changelog formats
  • be distributed as a single binary
  • reproducible results
    • depend on the fewer external things as possible
    • store changelog in a transportable format (.yml)
  • be possible to use it as a lib in other go projects (namely goreleaser itself)

Install

go install github.com/goreleaser/chglog/cmd/chglog@latest

Usage

The first steps are to run chglog config to initialize a configuration file (.chglog.yml) and edit the generated file according to your needs:

conventional-commits: false
exclude-merge-commits: false
deb:
  distribution: []
  urgency: ""
debug: false
owner: ""
package-name: ""

The next step is to run chglog init.

- semver: 0.0.1
  date: 2019-10-18T16:05:33-07:00
  packager: dj gilcrease <example@example.com>
  changes:
    - commit: 2c499787328348f09ae1e8f03757c6483b9a938a
      note: |-
        oops i forgot to use Conventional Commits style message

        This should NOT break anything even if I am asking to build the changelog using Conventional Commits style message
    - commit: 3ec1e9a60d07cc060cee727c97ffc8aac5713943
      note: |-
        feat: added file two feature

        BREAKING CHANGE: this is a backwards incompatible change
    - commit: 2cc00abc77d401a541d18c26e5c7fbef1effd3ed
      note: |-
        feat: added the fileone feature

        * This is a test repo
        * so ya!

Then to generate a CHANGELOG.md file you would do chglog format --template repo > CHANGELOG.md

Now whenever you go to do another release you would do chglog add --version v#.#.# (version MUST be semver format)

And that's it!

Usage as lib

You can look at the code of chglog itself to see how to use it as a library

Security updates and releases

Dependabot checks Go modules daily and groups security fixes into a single PR. A repository administrator must enable Dependabot alerts and Dependabot security updates in the repository's security settings; the configuration file alone does not enable them. See GitHub's setup instructions.

Builds and govulncheck must pass before the existing Dependabot job requests auto-merge. Maintainers should also require the lint check in branch protection. Dependency merges do not publish a release. After a security update merges:

  1. Review the changes since the last release and confirm main's build, lint, and vulnerability checks pass.
  2. Choose the next version (normally a patch release for security fixes) and push its v* tag at the reviewed commit.
  3. The release workflow scans that tag again, then GoReleaser builds and publishes the release using the existing GH_PAT secret.
  4. Download the published binary, inspect its Go version with go version -m, and scan it with govulncheck -mode=binary.

Use a current patched Go toolchain when building: standard-library fixes require rebuilding the binary, even when module dependencies have not changed. CI and releases use stable Go, and go.mod sets the minimum supported patch version. For local checks, install golang.org/x/vuln/cmd/govulncheck@v1.9.0 and run govulncheck ./....

Status

  • alpha

Donate

Donations are very much appreciated! You can donate/sponsor on the main goreleaser OpenCollective! It's easy and will surely help the developers at least buy some ☕️ or 🍺!


Would you like to fix something in the documentation? Feel free to open an issue.

About

chglog is a changelog management library and tool

Resources

Code of conduct

Stars

283 stars

Watchers

7 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

⌂ 换网址