@@ -5,14 +5,41 @@ A GitHub Action that parses [Keep a Changelog](https://keepachangelog.com/) form
55## Features
66
77- 📝 Parses Keep a Changelog format (like [ Mantle Framework] ( https://github.com/alleyinteractive/mantle-framework ) )
8- - 🎯 Extract specific versions or the latest release
8+ - 🎯 Extract all versions or a specific version
99- 📦 Returns structured data with sections (Added, Changed, Fixed, etc.)
10+ - 🔄 Supports mixed formats (with and without subsections)
1011- ✅ Comprehensive Jest test suite
1112- 🚀 Zero build step - pure JavaScript
1213
1314## Usage
1415
15- ### Basic Example
16+ ### Extract All Versions
17+
18+ By default, the action returns all versions in the changelog:
19+
20+ ``` yaml
21+ - name : Extract All Changelog Entries
22+ id : changelog
23+ uses : alleyinteractive/action-changelog-extractor@v1
24+
25+ - name : Process All Versions
26+ run : |
27+ # Access the first (latest) version
28+ echo '${{ fromJson(steps.changelog.outputs.result)[0].contents }}'
29+ ` ` `
30+
31+ ### Extract Specific Version
32+
33+ ` ` ` yaml
34+ - name : Extract v1.14.0 Changelog
35+ id : changelog
36+ uses : alleyinteractive/action-changelog-extractor@v1
37+ with :
38+ changelog-path : ' CHANGELOG.md'
39+ version : ' 1.14.0' # or 'v1.14.0'
40+ ` ` `
41+
42+ ### Create Release from Latest Version
1643
1744` ` ` yaml
1845name : Release
3057 - name : Extract Changelog
3158 id : changelog
3259 uses : alleyinteractive/action-changelog-extractor@v1
33- with :
34- version : ' latest'
3560
3661 - name : Create Release
3762 uses : actions/create-release@v1
@@ -40,42 +65,16 @@ jobs:
4065 with :
4166 tag_name : ${{ github.ref }}
4267 release_name : Release ${{ github.ref }}
68+ # Use the first (latest) version from the changelog
4369 body : ${{ fromJson(steps.changelog.outputs.result)[0].contents }}
4470` ` `
4571
46- ### Extract Specific Version
47-
48- ` ` ` yaml
49- - name : Extract v1.14.0 Changelog
50- id : changelog
51- uses : alleyinteractive/action-changelog-extractor@v1
52- with :
53- changelog-path : ' CHANGELOG.md'
54- version : ' 1.14.0' # or 'v1.14.0'
55- ` ` `
56-
57- ### Use Individual Sections
58-
59- ` ` ` yaml
60- - name : Extract Changelog
61- id : changelog
62- uses : alleyinteractive/action-changelog-extractor@v1
63-
64- - name : Process Sections
65- run : |
66- echo "Added features:"
67- echo '${{ fromJson(steps.changelog.outputs.result)[0].sections.added }}'
68-
69- echo "Bug fixes:"
70- echo '${{ fromJson(steps.changelog.outputs.result)[0].sections.fixed }}'
71- ` ` `
72-
7372## Inputs
7473
7574| Input | Description | Required | Default |
7675|-------|-------------|----------|---------|
7776| ` changelog-path` | Path to the changelog file | No | `CHANGELOG.md` |
78- | `version` | Version to extract (`latest` , `1.14.0`, or `v1.14.0`) | No | `latest` |
77+ | `version` | Specific version to extract (e.g. , `1.14.0` or `v1.14.0`). Leave empty to return all versions. | No | _(returns all)_ |
7978
8079# # Outputs
8180
0 commit comments