/changelog-from-github-releases

Generate a CHANGELOG.md from GitHub Releases

Primary LanguageTypeScriptMIT LicenseMIT

Changelog from GitHub Releases

GitHub Super-Linter CI Check dist/ CodeQL Coverage

Usage

The simplest way to use this action looks like this:

steps:
  - name: Checkout
    id: checkout
    uses: actions/checkout@v4

  - name: Generate CHANGELOG.md
    id: changelog
    uses: ricardoboss/changelog-from-github-releases@v1

  - name: Print CHANGELOG.md
    id: print-changelog
    run: cat CHANGELOG.md

The result will be a CHANGELOG.md file that looks like this:

# [v2.0.0](https://github.com/example/repo/releases/2) (2024-01-02)

Second release

# [v1.0.0](https://github.com/example/repo/releases/1) (2024-01-01)

First release

Inputs

file

The file to write the changelog to. Defaults to ./CHANGELOG.md.

repository

The repository to get the releases from. Defaults to ${{ github.repository }}.

token

The GitHub token to use for authentication. Defaults to ${{ github.token }}.

prerelease

Whether to include prereleases. Defaults to false.

Outputs

In addition to these outputs, the action also generates the file determined by the file input that contains the generated changelog.

changelog

The generated changelog.

Example using all inputs

steps:
  - name: Checkout
    id: checkout
    uses: actions/checkout@v4

  - name: Generate CHANGELOG.md
    id: changelog
    uses: ricardoboss/changelog-from-github-releases@v1
    with:
      file: './path/to/CHANGELOG.md'
      repository: 'owner/repository'
      token: '${{ secrets.MY_PAT }}'
      prerelease: 'true'

License

The code in this project is licensed under the MIT License.

Alternatives

Consider these alternatives to this action: