GitHub Action
Extract changes
v2.0.0
Latest version
Replacement of
awk -v ver=$(grep 'version' package.json | awk -F: '{ print $2 }' | tr -d \ \",) '/^#+ \[/ { if (p) { exit }; if ($2 == "["ver"]") { p=1; next } } p && NF' CHANGELOG.md > changes.txt
Extract changes from keep a changelog
for some version. Companion for
softprops/action-gh-release.
Required The name of the changelog
file. Default "CHANGELOG.md"
.
Required The version for which you want to extract the changes.
The name of the output file.
Changes of the specified version.
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the version
id: get_version
run: echo VERSION=$(jq -r .version package.json) >> $GITHUB_OUTPUT
- name: Create release body
id: extract_changes
uses: ultram4rine/extract-changes-action@v2
with:
changelog: CHANGELOG.md
version: ${{ steps.get_version.outputs.VERSION }}
- name: Create release
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.extract_changes.outputs.changes }}