Skip to content

📦 :octocat: GitHub Action for creating changelogs based on snippets

License

Notifications You must be signed in to change notification settings

brainelectronics/changelog-from-snippets

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Changelog from Snippets Action

Create release Release License: MIT

GitHub Action for creating changelogs based on snippets


Requirements

As this Action uses snippets2changelog to generate a changelog based on individual snippets, the requirements for the changelog format have to meet certain criterias.

Usage

Basic usage

With the default values used a changelog named changelog.md file located in the project root will be parsed and the new changelog will be created as changelog.md.new at the same location. For further details check the customizing section

See action.yml

name: Create changelog

on:
  push:
    branches:
      - main

permissions:
  contents: write

jobs:
  release:
    runs-on: ubuntu-latest
    name: Changelog
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          # all history is needed to crawl it properly
          fetch-depth: 0
      - name: 'Create changelog based on snippets'
        uses: brainelectronics/changelog-from-snippets@v1

Ensure the fetch-depth option value is set to 0 during the checkout

Customizing

The following are optional as step.with keys

Name Type Description
changelog-path String Path to (existing) changelog. Default to changelog.md
snippets-path String Path to folder with snippets. Default to .snippets
update-in-place Boolean Update changelog in place. Defaults to false
skip-internal Boolean Skip snippets with scope internal. Defaults to false
steps:
  - name: Checkout
    uses: actions/checkout@v4
  - name: 'Create changelog based on snippets'
    uses: brainelectronics/changelog-from-snippets@v1
    with:
      changelog-path: path/to/changelog.md
      changelog-path: path/to/snippets/
      update-in-place: true
      skip-internal: true

License

The scripts and documentation in this project are released under the MIT License