From 9485b19ed5b455a8ae2d9d6e462d602d9a33b9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B4nio=20Della=20Flora?= Date: Tue, 5 May 2020 14:56:37 -0300 Subject: [PATCH] Custom package.json dir documented --- README.md | 18 +++++++++++++++++- action.yml | 4 ++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f10d26..55c9068 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Make sure you use the `actions/checkout@v2` action! ### Workflow -* Based on the commit messages, increment the version from the lastest release. +* Based on the commit messages, increment the version from the latest release. * If the string "BREAKING CHANGE" or "major" is found anywhere in any of the commit messages or descriptions the major version will be incremented. * If a commit message begins with the string "feat" or includes "minor" then the minor version will be increased. This works @@ -21,3 +21,19 @@ Make sure you use the `actions/checkout@v2` action! * All other changes will increment the patch version. * Push the bumped npm version in package.json back into the repo. * Push a tag for the new version back into the repo. + +### Usage: +**tag-prefix:** Prefix that is used for the git tag (optional). Example: +```yaml +- name: 'Automated Version Bump' + uses: 'phips28/gh-action-bump-version@master' + with: + tag-prefix: '' +``` +**PACKAGEJSON_DIR:** Param to parse the location of the desired package.json (optional). Example: +```yaml +- name: 'Automated Version Bump' + uses: 'phips28/gh-action-bump-version@master' + env: + PACKAGEJSON_DIR: 'frontend' +``` diff --git a/action.yml b/action.yml index 9716c4b..4028e0a 100644 --- a/action.yml +++ b/action.yml @@ -11,3 +11,7 @@ inputs: description: 'Prefix that is used for the git tag' default: '' required: false + PACKAGEJSON_DIR: + description: 'Custom dir to the package' + default: '' + required: false