diff --git a/README.md b/README.md index abcff9d..2ace85c 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ you'll need to configured that workflow yourself. You can look to the ### Workflow * Based on the commit messages, increment the version from the lastest release. - * If the string "BREAKING CHANGE" is found anywhere in any of the commit messages or descriptions the major + * 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" then the minor version will be increased. This works + * If a commit message begins with the string "feat" or "minor" then the minor version will be increased. This works for most common commit metadata for feature additions: `"feat: new API"` and `"feature: new API"`. * All other changes will increment the patch version. * Push the bumped npm version in package.json back into the repo. diff --git a/index.js b/index.js index 00dd9ab..06d59f9 100644 --- a/index.js +++ b/index.js @@ -21,9 +21,10 @@ Toolkit.run(async tools => { } let version = 'patch' - if (messages.map(message => message.includes('BREAKING CHANGE')).includes(true)) { + if (messages.map(message => message.includes('BREAKING CHANGE') || message.includes('major')).includes(true)) { version = 'major' - } else if (messages.map(message => message.toLowerCase().startsWith('feat')).includes(true)) { + } else if (messages.map( + message => message.toLowerCase().startsWith('feat') || message.toLowerCase().includes('minor')).includes(true)) { version = 'minor' }