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
+54 -31
+54 -31
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,34 +98,38 @@ Other Changes
The generated changelog. The generated changelog.
### Example usage ### Example Usage
Using default inputs: Using with default inputs:
```yaml ```yaml
uses: ardalanamini/auto-changelog@v1 - name: Changelog
uses: ardalanamini/auto-changelog@v1
id: changelog
``` ```
Using custom inputs: Using with custom inputs:
```yaml ```yaml
uses: ardalanamini/auto-changelog@v1 - name: Changelog
with: uses: ardalanamini/auto-changelog@v1
token: ${{ github.token }} id: changelog
commit-types: | with:
breaking: Breaking Changes token: ${{ github.token }}
feat: New Features commit-types: |
fix: Bug Fixes breaking: Breaking Changes
revert: Reverts feat: New Features
perf: Performance Improvements fix: Bug Fixes
refactor: Refactors revert: Reverts
deps: Dependencies perf: Performance Improvements
docs: Documentation Changes refactor: Refactors
style: Code Style Changes deps: Dependencies
build: Build System docs: Documentation Changes
ci: Continuous Integration style: Code Style Changes
test: Tests build: Build System
chore: Chores ci: Continuous Integration
other: Other Changes test: Tests
default-commit-type: Other Changes chore: Chores
other: Other Changes
default-commit-type: Other Changes
``` ```