A GitHub Action that generates a commit-based changelog between two Git tags.
- uses: nidotls/git-log-action@v2
id: changelogBy default, the action auto-detects the two most recent tags and generates a changelog of commits between them.
| Input | Description | Required | Default |
|---|---|---|---|
from-tag |
Starting tag (exclusive) | No | Second-to-last tag |
to-tag |
Ending tag (inclusive) | No | Latest tag |
| Output | Description |
|---|---|
previousTag |
The resolved starting tag (empty if only one tag exists) |
latestTag |
The resolved ending tag |
log |
Plain text changelog (one commit per line) |
markdownLog |
Markdown formatted changelog with commit links |
Auto-detect tags:
- uses: nidotls/git-log-action@v2
id: changelog
- run: echo "${{ steps.changelog.outputs.log }}"Specify tags manually:
- uses: nidotls/git-log-action@v2
id: changelog
with:
from-tag: v1.0.0
to-tag: v1.1.0Use Markdown output in a release:
- uses: nidotls/git-log-action@v2
id: changelog
- uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changelog.outputs.markdownLog }}Plain text (log):
abc1234 - @username - Fix bug in parser
def5678 - @username - Add new featureMarkdown (markdownLog):
[`abc1234`](https://github.com/owner/repo/commit/abc1234) @username - Fix bug in
parser
[`def5678`](https://github.com/owner/repo/commit/def5678) @username - Add new featurenpm install # Install dependencies
npm test # Run tests
npm run bundle # Build for distribution