docs: Update README.md

This commit is contained in:
Ardalan Amini committed 2022-03-04 15:36:13 +03:30
1 parent ea01804ccf
commit 22a0796f91
1 file changed
+34 -11
+34 -11
View File
@@ -4,6 +4,17 @@
Automatic Changelog generator Automatic Changelog generator
## Table of Content
- [Usage](#usage)
- [Inputs](#inputs)
- [Github Token](#token)
- [Commit Types](#commit-types)
- [Default Commit Type](#default-commit-type)
- [Outputs](#outputs)
- [Changelog](#changelog)
- [Example Usage](#example-usage)
## Usage ## Usage
To use this action, your commit messages have to follow the format below: To use this action, your commit messages have to follow the format below:
@@ -12,23 +23,27 @@ To use this action, your commit messages have to follow the format below:
type(category): description [flag] type(category): description [flag]
``` ```
* The `type` must be one of `commit-types` input keys. In the changelog output, the value will be used. - The `type` must be one of `commit-types` input keys. In the changelog output, the value will be used.
> The changelogs will be in the same order as `commit-types` input. > The changelogs will be in the same order as `commit-types` input.
> If the `type` doesn't match any of the provided `commit-types` input keys, The `default-commit-type` input will be used instead. > If the `type` doesn't match any of the provided `commit-types` input keys, The `default-commit-type` input will be used instead.
* The `category` is optional and can be anything of your choice. - The `category` is optional and can be anything of your choice.
* The `flag` is optional (if provided, it must be surrounded in square brackets) and can be one of the followings: - The `flag` is optional (if provided, it must be surrounded in square brackets) and can be one of the followings:
* `ignore` (Omits the commit from the changelog) - `ignore` (Omits the commit from the changelog)
> If `flag` is not found in the list, it'll be ignored. > If `flag` is not found in the list, it'll be ignored.
> Commit messages not matching the format mentioned above will be ignored in the `changelog` output.
### Inputs ### Inputs
#### `token` **(Optional)** #### `token`
**(Optional)**
Github token. Github token.
@@ -38,9 +53,11 @@ _Default:_
${{ github.token }} ${{ github.token }}
``` ```
#### `commit-types` **(Optional)** #### `commit-types`
Commit type. **(Optional)**
Commit types.
_Default:_ _Default:_
@@ -61,7 +78,9 @@ chore: Chores
other: Other Changes other: Other Changes
``` ```
#### `default-commit-type` **(Optional)** #### `default-commit-type`
**(Optional)**
Default commit type. Default commit type.
@@ -79,18 +98,22 @@ Other Changes
The generated changelog. The generated changelog.
### Example usage ### Example Usage
Using default inputs: Using with default inputs:
```yaml ```yaml
- name: Changelog
uses: ardalanamini/auto-changelog@v1 uses: ardalanamini/auto-changelog@v1
id: changelog
``` ```
Using custom inputs: Using with custom inputs:
```yaml ```yaml
- name: Changelog
uses: ardalanamini/auto-changelog@v1 uses: ardalanamini/auto-changelog@v1
id: changelog
with: with:
token: ${{ github.token }} token: ${{ github.token }}
commit-types: | commit-types: |