wntrblm/flask-talisman

Automatic change log GitHub Action

Closed this issue · 1 comments

I use the release-drafter GitHub actions on other repos I help maintain.

It opens/updates a Draft Release (only viewable by maintainers until it's released) for every pull request merge. Very handy to know everything that's changed since last release (you forget yourselves sometimes). You can then edit the release notes before publishing as a new release if you wanna refine the wording.

Here's an example of a repo that I use it on: https://github.com/HTTPArchive/almanac.httparchive.org/releases

Just need a .github/workflows/add-to-release-notes.yml file containing something like this:

name: Add to Release Notes
on:
  push:
    branches:
      - main
jobs:
  release-notes:
    runs-on: ubuntu-20.04
    # Only run this on main repo
    if: github.repository == 'wntrblm/flask-talisman'
    steps:
    - name: Update release notes
      uses: release-drafter/release-drafter@v5
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

And then a .gtihub/release-drafter.yml file containing something like this:

template: |
  ## What’s Changed

  $CHANGES

Though there's lots more options if you really wanna get into it: https://github.com/release-drafter/release-drafter#configuration

Let me know if you think it would be useful to set it up for here and happy to submit the Pull Request.

Since I opened this GitHub has added the ability to auto generate release notes.

The Release Drafter has the benefit that you can just go to the https://github.com/wntrblm/flask-talisman/releases to see the current list of issues, while the GitHub one involves creating a draft release adding a tag (which can be temporary) and then not saving it, to see the list of changes. So the integrated one is not quite as nice in that respect.

On the flip side, the integrated one has a nice "new contributors section":

screenshot of auto generated release notes

So, all in all, I think the integrated one is good enough, so closing.