mirror of
https://github.com/orhun/git-cliff-action.git
synced 2026-03-22 15:35:44 +08:00
docs(readme): add description for the example
This commit is contained in:
20
README.md
20
README.md
@@ -1,29 +1,32 @@
|
|||||||
# git-cliff changelog generator action
|
# git-cliff action
|
||||||
|
|
||||||
This action generates a changelog based on your Git history using [git-cliff](https://github.com/orhun/git-cliff), on the fly!
|
This action generates a changelog based on your Git history using [git-cliff](https://github.com/orhun/git-cliff) on the fly!
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Inputs
|
### Input variables
|
||||||
|
|
||||||
- `config`: Path of the configuration file. Default: `"cliff.toml"`
|
- `config`: Path of the configuration file. (Default: `"cliff.toml"`)
|
||||||
- `args`: Arguments to pass to git-cliff. Default: `"-v"`
|
- `args`: Arguments to pass to git-cliff. (Default: `"-v"`)
|
||||||
|
|
||||||
### Outputs
|
### Output variables
|
||||||
|
|
||||||
- `changelog`: Output file that contains the generated changelog.
|
- `changelog`: Output file that contains the generated changelog.
|
||||||
|
|
||||||
### Environment
|
### Environment variables
|
||||||
|
|
||||||
- `OUTPUT`: Output file. Default: `"git-cliff/CHANGELOG.md"`
|
- `OUTPUT`: Output file. (Default: `"git-cliff/CHANGELOG.md"`)
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
|
The following example fetches the whole Git history (`fetch-depth: 0`), generates a changelog in `./CHANGELOG.md`, and prints it out.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Generate a changelog
|
- name: Generate a changelog
|
||||||
uses: orhun/git-cliff-action@v1
|
uses: orhun/git-cliff-action@v1
|
||||||
id: git-cliff
|
id: git-cliff
|
||||||
@@ -32,6 +35,7 @@ This action generates a changelog based on your Git history using [git-cliff](ht
|
|||||||
args: --verbose
|
args: --verbose
|
||||||
env:
|
env:
|
||||||
OUTPUT: CHANGELOG.md
|
OUTPUT: CHANGELOG.md
|
||||||
|
|
||||||
- name: Print the changelog
|
- name: Print the changelog
|
||||||
run: cat "${{ steps.git-cliff.outputs.changelog }}"
|
run: cat "${{ steps.git-cliff.outputs.changelog }}"
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user