Skip to content

๐Ÿ“„ Github action to parse changelogs to create automatic Github releases

License

Notifications You must be signed in to change notification settings

snapADDY/snapaddy-changelog-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

snapADDY Changelog Parser

A Github Action to parse manually created changelogs for automatic Github Releases.

This action reads a markdown changelog file, and provides the latest versions release notes to steps further down the pipeline.

Simple example:

on:
  push:
    tags:
      - "[0-9]+.[0-9]+.[0-9]+"

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

    steps:
      - name: Read Changelog
        uses: snapADDY/[email protected]
        id: read
      - name: Release
        uses: softprops/action-gh-release@v1
        with:
          body: ${{ steps.read.outputs.changelog }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Required changelog formatting:

Each section hast to start with a # followed by a space (markdown H1) and a semver formatted version number. Brackets around the version number are also supported, in case it's a hyperlink.

# 1.0.0
or
# [1.0.0](https://)

Example:

This input:

# [1.0.0](https://github.com/...) (2021-04-30)
## Features
- CI Magic ๐Ÿง™โ€โ™‚๏ธ

# [0.1.0](https://github.com/...) (2021-04-27)
## Fixes
- more notes

would return:

## Features
- CI Magic ๐Ÿง™โ€โ™‚๏ธ

Input

Name Type Description Default
changelog-path string Path to the changelog file CHANGELOG.md

Output

Name Type Description
changelog string see example above

Dev Notes

If you make any adjustments, make sure to run npm run build before committing.

About

๐Ÿ“„ Github action to parse changelogs to create automatic Github releases

Resources

License

Stars

Watchers

Forks