Merge pull request #51 from bootsie123/patch-1

Support for changing the default version bump
This commit is contained in:
Phil 2020-10-23 09:25:53 +02:00 committed by GitHub
commit 32df3182d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -40,6 +40,14 @@ Make sure you use the `actions/checkout@v2` action!
skip-tag: 'true' skip-tag: 'true'
``` ```
**default:** Set a default version bump to use (optional - defaults to patch). Example:
```yaml
- name: 'Automated Version Bump'
uses: 'phips28/gh-action-bump-version@master'
with:
default: prerelease
```
**wording:** Customize the messages that trigger the version bump. It must be a string, case sensitive, coma separated (optional). Example: **wording:** Customize the messages that trigger the version bump. It must be a string, case sensitive, coma separated (optional). Example:
```yaml ```yaml
- name: 'Automated Version Bump' - name: 'Automated Version Bump'

View File

@ -31,7 +31,7 @@ Toolkit.run(async tools => {
const patchWords = process.env['INPUT_PATCH-WORDING'].split(',') const patchWords = process.env['INPUT_PATCH-WORDING'].split(',')
const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',') const preReleaseWords = process.env['INPUT_RC-WORDING'].split(',')
let version = 'patch' let version = process.env['DEFAULT'] || 'patch'
let foundWord = null; let foundWord = null;
if (messages.some( if (messages.some(