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
## 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
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]
```
* 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.
> 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.
> Commit messages not matching the format mentioned above will be ignored in the `changelog` output.
### Inputs
#### `token` **(Optional)**
#### `token`
**(Optional)**
Github token.
@@ -38,9 +53,11 @@ _Default:_
${{ github.token }}
```
#### `commit-types` **(Optional)**
#### `commit-types`
Commit type.
**(Optional)**
Commit types.
_Default:_
@@ -61,7 +78,9 @@ chore: Chores
other: Other Changes
```
#### `default-commit-type` **(Optional)**
#### `default-commit-type`
**(Optional)**
Default commit type.
@@ -79,34 +98,38 @@ Other Changes
The generated changelog.
### Example usage
### Example Usage
Using default inputs:
Using with default inputs:
```yaml
uses: ardalanamini/auto-changelog@v1
- name: Changelog
uses: ardalanamini/auto-changelog@v1
id: changelog
```
Using custom inputs:
Using with custom inputs:
```yaml
uses: ardalanamini/auto-changelog@v1
with:
token: ${{ github.token }}
commit-types: |
breaking: Breaking Changes
feat: New Features
fix: Bug Fixes
revert: Reverts
perf: Performance Improvements
refactor: Refactors
deps: Dependencies
docs: Documentation Changes
style: Code Style Changes
build: Build System
ci: Continuous Integration
test: Tests
chore: Chores
other: Other Changes
default-commit-type: Other Changes
- name: Changelog
uses: ardalanamini/auto-changelog@v1
id: changelog
with:
token: ${{ github.token }}
commit-types: |
breaking: Breaking Changes
feat: New Features
fix: Bug Fixes
revert: Reverts
perf: Performance Improvements
refactor: Refactors
deps: Dependencies
docs: Documentation Changes
style: Code Style Changes
build: Build System
ci: Continuous Integration
test: Tests
chore: Chores
other: Other Changes
default-commit-type: Other Changes
```