Skip to content

Create a GitHub release with a changelog generated by filtered commit messages

License

Notifications You must be signed in to change notification settings

marcantondahmen/release-notes-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Regex Filtered Release Notes Action

This GitHub action creates a release with a simple changelog when a tag is pushed and is based on the Automatic Releases action. The changelog is generated out of commits between the current and the latest tag. Commits can optionally be filtered by a regex pattern to only include matching messages. Commit messages are parsed following the Conventional Commits specification.

Usage

A workflow using this actions looks as follows:

name: "release-notes"

on:
  push:
    tags:
      - "*"

jobs:
  release-notes:
    name: "Regex Filtered Release Notes"
    runs-on: "ubuntu-latest"
    steps:
      - uses: "marcantondahmen/release-notes-action@master"
        with:
          repo_token: "${{ secrets.GITHUB_TOKEN }}"
          prerelease: false
          draft: false
          filter: "^(feat|fix)"
          strict: true

Options

The following options are available to configure a workflow.

Name Description
repo_token GitHub secret token (required)
draft Release is a draft (false)
prerelease Release is a pre-release (false)
filter Filter the included commit messages by a given regex ("^(feat|fix)")
strict Only include commit messages that follow the conventional commits scheme (true)