Skip to content

feat: add increment option #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
| `commitizen_version` | Specify the version to be used by commitizen. Eg: `2.21.0` | latest |
| `changelog` | Create changelog when bumping the version | true |
| `no_raise` | Don't raise the given comma-delimited exit codes (e.g., no_raise: '20,21'). Use with caution! Open an issue in [commitizen](https://github.com/commitizen-tools/commitizen/issues) if you need help thinking about your workflow. | [21](https://commitizen-tools.github.io/commitizen/exit_codes/) |
| `increment` | Manually specify the desired increment {MAJOR,MINOR,PATCH} | - |

## Outputs

Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ inputs:
description: "Don't raise the given comma-delimited exit codes"
required: false
default: '21'
increment:
description: "Manually specify the desired increment"
required: false
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ fi
if [[ $INPUT_COMMIT == 'false' ]]; then
CZ_CMD+=('--files-only')
fi
if [[ $INPUT_INCREMENT ]]; then
CZ_CMD+=('--increment' "$INPUT_INCREMENT")
fi
if [[ $INPUT_CHANGELOG_INCREMENT_FILENAME ]]; then
CZ_CMD+=('--changelog-to-stdout')
echo "${CZ_CMD[@]}" ">$INPUT_CHANGELOG_INCREMENT_FILENAME"
Expand Down