Jump to research

Composed by

Profile picture

В. Б.

Views

214

Version history

В. Б., 793d ago

February 28, 2023

github actions hot to generate changelog

Have an opinion? Send us proposed edits/additions and we may incorporate them into this article with credit.

Words

855

Time

1m 41s

Contributors

18

Words read

4.0k

Changelog CI

Changelog CI

It seems that Changelog CI is an option for generating a changelog via GitHub Actions. People say that it can be used to auto-generate change logs from PR titles and help ensure that important changes are not forgotten [2] [3] . It also allows users to interpret commit messages and pull out user-level information using Conventional Commits "standard" [6] , and conventional-changelog can be used to handle a variety of commit conventions [7] . However, it is important to note that while automated changelogs are useful, they should still be reviewed by a human before being published [7] .
action-github-changelog-generator

action-github-changelog-generator

It seems that the "action-github-changelog-generator" action is a popular choice for automatically generating changelogs on GitHub. It supports a wide range of inputs such as token, dateFormat, output, base, headerLabel, configureSections, addSections [4] , and has outputs including changelog [4] . In addition, it can be used in conjunction with other actions such as `mindsers/changelog-reader-action` and `actions/create-release` to generate GitHub Releases with the content of the changelog entry [5] . Furthermore, it has support for custom templates which can be used to customize the changelog output [8] and commits any changes to the CHANGELOG.md file using the "Git-Auto-Commit-Action" action [10] .
mindsers/changelog-reader-action

mindsers/changelog-reader-action

It seems that mindsers/changelog-reader-action, in combination with actions/create-release, is a popular way to automate changelog and releases creation in GitHub [2] . This action should be used when pushing a new tag, as it can be used to select the changelog entry associated with the tag and generate a GitHub Release with the content of the changelog entry [4] [7] . Although other options are available for auto-generating your project's changelog [1] , it seems that this combination of actions is a preferred choice for many users.
actions/create-release

actions/create-release

It seems that "actions/create-release" is an action that can be used to generate a changelog for a project on GitHub. Sources [2] , [5] and [7] suggest that this action can be used with other actions such as `mindsers/changelog-reader-action` and `heinrichreimer/github-changelog-generator-action` to generate a changelog from tags, issues, labels and pull requests. Furthermore, it seems that this action requires an authentication token in order to work, as noted in source [5] .
heinrichreimer/github-changelog-generator-action

heinrichreimer/github-changelog-generator-action

It seems that heinrichreimer/github-changelog-generator-action is a GitHub Action which can be used as part of a CI process to automate the generation and update of changelogs. It can group changes under an "Unreleased" section [5] , and it can add sections for labels such as "Documentation" [5] . The action requires inputs such as token, dateFormat, and output [8] , and it provides an output called `changelog` [8] . Furthermore, it appears that this action can be used in conjunction with other actions like `mindsers/changelog-reader-action` and `actions/create-release`, which together can generate a GitHub Release with the content of the changelog entry when pushing a new tag [5] .
All answers

All answers

  • Changelog CI
  • action-github-changelog-generator
  • mindsers/changelog-reader-action
  • actions/create-release
  • heinrichreimer/github-changelog-generator-action
  • Danger JS
  • conventional-changelog
  • git log
  • git-chglog
  • Helmisek/conventional-changelog-generator
  • Changelog from Conventional Commits
  • Git-Auto-Commit-Action
  • Generate Changelog

    Generating a changelog is an essential part of project maintenance. One way to do this is via using commit messages to create a "first version" of the changelog [1] . This should then be massaged and fixed up before being the real final changelog, as it serves as a good way to not forget something important [1] .

    Automation

    The use of GitHub Actions can help automate the process of generating and updating changelogs. For example, the `heinrichreimer/github-changelog-generator-action` Action is useful for automating the generation and update of changelogs from merged PRs, issues, and commits to the `main` branch [5] . Additionally, other Actions such as `mindsers/changelog-reader-action` and `actions/create-release` can be used for pushing new tags [5] .

    Commit Messages

    Iterating over commit messages and generating a custom format is possible for those with programming knowledge [6] . Additionally, Conventional Commits offer a structured commit message format which allows keywords to pull out user-level information [6] . Furthermore, tools such as conventional-changelog can be used to handle a variety of commit conventions [6] .

    Generating a Custom Format

    Creating your own template is possible with some existing GitHub Actions. For example, the Changelog Generator Action allows copying the CHANGELOG.tpl.md into your project, modifying it and adding its file path to the action configuration [9] . Additionally, using actions/checkout@v2 will allow fetching git history for the changelog while using seasonalmatcha/conventional-commit-changelog@latest will generate it from said history [3] , with its output being accessible via `${{ steps.changelog.outputs.changelog }}` [3] .

    Conventional Commits 'Standard'

    Actions such as "Changelog from Conventional Commits" can generate CHANGELOG changes in Markdown format based on user inputted information about next version number, configuration directory for git-chglog files (default: .ghglog), filename for writing changes (default: CHANGELOG.md), tag (optional) for generating only one tag's changes [10] , etc. This action also allows automatic injection of changes into already existing CHANGELOGs without messing up headers or instructions present at the top while also adding BREAKING CHANGE notes when relevant [10] . This can be coupled with Git Auto Commit Action which commits any changes made to the CHANGELOG.md file with an optional customized message including "[skip ci]" if needed [10] .

    Jump to top

    Research

    Source: "Generating changelogs from git" (from reddit, r/git)

    • Iterating over commit messages and generating a custom format
      • This can be done by a programmer to allow more flexibility in how commits are structured
      • Commit messages should be understandable by programmers, while changelogs should be understandable by users
    • Conventional Commits “standard”
      • This is a structured commit message format which allows keywords to pull out user-level information
    • conventional-changelog
      • This is a tool which can be used to handle a variety of commit conventions

    Source: "Changelog from Conventional Commits * Actions -..." (from web, github.com)

    • Use the Github Action “Changelog from Conventional Commits”
      • Generates the CHANGELOG changes in Markdown format
      • Turns PR ids into links and add the PR author
      • Prepends a shortened commit SHA ID to the commit for quick access
      • Adds BREAKING CHANGE notes to the top of the changelog version for each related commit
      • Exports changelog to a variable that can used in a subsequent step to create a release changelog
      • Automatically injects the changes into the CHANGELOG.md file or creates it if it doesn’t exist yet
      • Will not mess up with any header or instructions you already have at the top of your CHANGELOG.md
      • Will not add duplicate version changes if it already exists in the CHANGELOG.md file
      • Optionally exclude types from the CHANGELOG (default: build,docs,other,style)
    • Use the “Git-Auto-Commit-Action”
      • Commits any changes to the CHANGELOG.md file
      • Allows for a custom commit message, including “[skip ci]” if needed

    Source: "Generate changelog with git-chglog * Actions - ..." (from web, github.com)

    • Create a workflow.yml file in your repositories.github/workflows directory
      • Reference the GitHub Help Documentation for Creating a workflow file
      • Further more you need to have git-chlog configured and have the configuration added to your git repository
    • Inputs:
      • next_version: Next version number
      • config_dir: git-chglog configuration directory. Default: .ghglog
      • filename: Filename to write the changelog to. Default: CHANGELOG.md
      • tag: Optional, Generate changelog only for this tag.
    • Outputs:
      • changelog: Changelog content if no filename input is empty
    • Example workflow - upload a release asset
      • On every push to master generate a CHANGELOG.md file

    Source: "Is it worth it to auto-generate changelogs? [xp..." (from reddit, r/github)

    • Use git log:
      • You can get a lot of information from git log
    • Use Danger JS:
      • Mentioned as a tool for automating the generation and update of changelogs
    • Human in the loop is key:
      • Commit messages and PR titles are useful as a starting point but need interpretation to make useful documentation
      • Process of creating the changelog depends on branching/release model

    Source: "Conventional changelog generator * Actions * Gi..." (from web, github.com)

    • Automatically generate the changelog based on your commit convention for your latest tagged version with Changelog Generator
      • The changelog is accessible as action output available to other actions via output
      • Example usage: uses: Helmisek/conventional-changelog-generator@v1.0.6-release
      • Inputs: commit-types, current-tag, template-path, tag-regex
      • Outputs: changelog
    • Use your own custom template
      • Copy the CHANGELOG.tpl.md into your project
      • Modify it and add the file path to the action configuration

    💭  Looking into

    What is the best way to generate changelogs using GitHub Actions?

    💭  Looking into

    How can I automate the process of generating changelogs and releases in GitHub?

    💭  Looking into

    What features does the heinrichreimer/github-changelog-generator-action action provide?

    💭  Looking into

    How can the action-github-changelog-generator be used to generate changelogs?

    💭  Looking into

    What features does the conventional-commit-changelog action provide?

    💭  Looking into

    How does Changelog CI work to generate changelogs?

    💭  Looking into

    What types of Github Actions are available for generating changelogs?

    Source: "Generate changelog * Actions * GitHub Marketpla..." (from web, github.com)

    • Use the action-github-changelog-generator
      • Automatically generate change log from your tags, issues, labels and pull requests on GitHub, using github-changelog-generator’s Docker image.
      • This action also makes the changelog available to other actions as output.
      • Inputs include token, dateFormat, output, base, headerLabel, configureSections, addSections, frontMatter, issues, issuesWoLabels, pullRequests, prWoLabels, filterByMilestone, author, usernamesAsGithubLogins, unreleasedOnly, unreleased, unreleasedLabel, compareLink, includeLabels, excludeLabels, issueLineLabels, excludeTags, excludeTagsRegex, sinceTag, dueTag, maxIssues, releaseUrl, githubSite, githubApi, simpleList, futureRelease, releaseBranch, httpCache, cacheFile, cacheLog, sslCaFile, verbose, breakingLabel, breakingLabels, enhancementLabel, enhancementLabels, bugsLabel, bugLabels, deprecatedLabel, deprecatedLabels, removedLabel, removedLabels, securityLabel, securityLabels, issuesLabel, prLabel, onlyLastTag, stripHeaders, stripGeneratorNotice
    • Outputs include changelog

    Source: "Automate changelog and releases creation in GitHub" (from web, dev.to)

    • Use the heinrichreimer/github-changelog-generator-action Action
      • This action should be used as part of a CI process
      • It can handle merged PRs, issues, and commits to the main branch
      • It can group changes under an “Unreleased” section
      • It can add sections for labels, such as “Documentation”
    • Use the mindsers/changelog-reader-action and actions/create-release Actions
      • These should be used when pushing a new tag
      • The changelog-reader-action can be used to select the changelog entry associated with the tag
      • The create-release action can be used to generate a GitHub Release with the content of the changelog entry
      • The create-release action requires the GITHUB_TOKEN for authentication

    Source: "Generate Changelog (Conventional Commit) * Acti..." (from web, github.com)

    • Use actions/checkout@v2
      • This allows you to fetch the git history for the changelog
    • Use seasonalmatcha/conventional-commit-changelog@latest
      • This is the action that will generate the changelog from the git history
      • This action requires two inputs: from and to (references or tags to mark the start and end of the changelog)
      • The output of this action can be accessed with ${{ steps.changelog.outputs.changelog }}
    • This work is inspired by https://github.com/dlavrenuek/conventional-changelog-action
      • Some of the code has been reused and modified to fit the needs of the task

    Source: "A GitHub Action that generates a changelog for you" (from web, changelog.com)

    • Use Changelog CI to generate a changelog via carefully crafted PR titles
      • Changelog CI is not a new service offering from news feed providers
      • Auto-generating your project’s changelog may be a good idea

    Source: "How to generate Changelog using Conventional Co..." (from reddit, r/github)

    • Use commit messages to create a “first version” of the changelog
      • This is meant to be massaged and fixed up before being the real final changelog
      • This is a good way to not forget something important
    • Changelogs should be done for some projects
      • This can be added to the toolbox

    💭  Looking into

    What is the best way to generate a changelog with GitHub Actions?