blog

Automating release notes

At work, we have a setup that builds and deploy our app to production when pushing to the master branch. We also use git tags so we can have versioned releases.

I wanted to automate this process like so:

To achieve this I combined several services.

  1. standard-version to handle the first two requirements. I did it by running npx standard-version.

  2. GitHub Automatic Releases action to generate GitHub release notes on tag push. It doesn't use CHANGELOG.md but looks at the same commit set and extracts it almost identically. I was fine with that.

My .github/workflows/release.yml file:

name: Release

on:
push:
tags:
- "v*"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"

steps:
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
  1. GitHub's Slack app to subscribe to releases in my repo and post them in #releases channel.

These are commands I posted in the channel to subscribe only to releases and eliminate other GH chatter:

/github subscribe popularlab/REPO-NAME
/github unsubscribe popularlab/REPO-NAME issues,pulls,statuses,commits,public,deployments