Skip to content

Commit

Permalink
feat: add current version info to output + override bump triggers (#1)
Browse files Browse the repository at this point in the history
* feat: add current version info to output

* feat: add current version to action

* fix: add missing attribute

* feat: add tags as optional parameters

* refactor: store changes in array instead of counter

* fix: remove quotes from default values

* fix: add missing attribute

* build: add new dist file

* refactor: add code review changes

* fix: fix name for input

* docs: inputs typo

* docs: action inputs typo

Co-authored-by: Nicolas Giard <[email protected]>
  • Loading branch information
HRADigital and NGPixel authored Mar 26, 2022
1 parent 26f1d67 commit 64eb43b
Show file tree
Hide file tree
Showing 4 changed files with 1,365 additions and 1,336 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div align="center">

<img src="https://raw.githubusercontent.com/ietf-tools/common/main/assets/logos/semver-action.svg" alt="Semver Github Action" height="125" />

[![Release](https://img.shields.io/github/release/ietf-tools/semver-action.svg?style=flat&maxAge=600)](https://github.com/ietf-tools/semver-action/releases)
[![License](https://img.shields.io/github/license/ietf-tools/semver-action)](https://github.com/ietf-tools/semver-action/blob/main/LICENSE)

##### Semver Conventional Commits - Github Action

</div>

---
Expand Down Expand Up @@ -50,8 +50,13 @@ jobs:
## Inputs
* `token`: Your GitHub token (e.g. `${{ github.token }}`) - **REQUIRED**
* `branch`: The branch to use when fetching list of commits to compare against. (e.g. `main`) - **Optional**
* `majorList`: Comma separated commit prefixes, used to bump Major version. Defaults to empty. *A `BREAKING CHANGE` note in a commit message will still cause a major bump.* - **Optional**
* `minorList`: Comma separated commit prefixes, used to bump Minor version. Defaults to (`feat, feature`) - **Optional**
* `patchList`: Comma separated commit prefixes, used to bump Patch version. Defaults to (`fix, bugfix, perf, refactor, test, tests`) - **Optional**
* `patchAll`: If set to `true`, will ignore `patchList` and always count commits as a Patch. Defaults to `false` - **Optional**

## Outputs
* `current`: Current version number / Latest tag
* `next`: Next version number in format v0.0.0
* `nextStrict`: Next version number without the v prefix

Expand Down
18 changes: 18 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,25 @@ inputs:
description: The branch to use when fetching list of commits to compare against
required: false
default: main
majorList:
description: Comma separated commit prefixes, used to bump Major version
required: false
default: ''
minorList:
description: Comma separated commit prefixes, used to bump Minor version
required: false
default: feat, feature
patchList:
description: Comma separated commit prefixes, used to bump Patch version
required: false
default: fix, bugfix, perf, refactor, test, tests
patchAll:
description: If set to true, will ignore patchList and count any commit as a Patch
required: false
default: false
outputs:
current:
description: Current version number
next:
description: Next version number in format v0.0.0
nextStrict:
Expand Down
Loading

0 comments on commit 64eb43b

Please sign in to comment.