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.
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/snapaddy-parse-changelog@0.1.0
id: read
- name: Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.read.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}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://)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 noteswould return:
## Features
- CI Magic ๐งโโ๏ธ| Name | Type | Description | Default |
|---|---|---|---|
| changelog-path | string | Path to the changelog file | CHANGELOG.md |
| Name | Type | Description |
|---|---|---|
| changelog | string | see example above |
If you make any adjustments, make sure to run npm run build before committing.