A GitHub Action to generate semantic version from a git repository's commit history.
Find a file
2020-01-25 11:45:07 -05:00
.github/workflows Support short version tags; fix tests (MAJOR) 2019-12-09 22:23:58 -05:00
dist Add path change detection (MINOR) 2020-01-25 11:13:16 -05:00
.eslintrc.json Use tags instead of branched; add unit tests. 2019-12-09 21:52:42 -05:00
.gitignore Initial Commit 2019-12-05 20:21:29 -05:00
action.yml Add path change detection (MINOR) 2020-01-25 11:13:16 -05:00
index.js Add path change detection (MINOR) 2020-01-25 11:13:16 -05:00
index.test.js Add path change detection (MINOR) 2020-01-25 11:13:16 -05:00
LICENSE Initial Commit 2019-12-05 20:21:29 -05:00
package-lock.json Use tags instead of branched; add unit tests. 2019-12-09 21:52:42 -05:00
package.json Use tags instead of branched; add unit tests. 2019-12-09 21:52:42 -05:00
readme.md Update readme to include new change_path input description 2020-01-25 11:45:07 -05:00

GitHub Actions status

Git-Based Semantic Versioning

This action produces a semantic version for a repository using the repository's git history.

This action is designed to facilitate assigning version numbers during a build automatically while publishing version that only increment by one value per release. To accomplish this, the next version number is calculated along with a commit increment indicating the number of commits for this version. The commit messages are inspected to determine the type of version change the next version represents. Including the term (MAJOR) or (MINOR) in the commit message alters the type of change the next version will represent.

Usage

- uses: paulhatch/semantic-version@v1-beta
  with:
    # The branch to count commits on
    branch: "master"
    # The prefix to use to identify tags
    tag_prefix: "v"
    # A string which, if present in a git commit, indicates that a change represents a major (breaking) change
    major_pattern: "(MAJOR)"
    # Same as above except indicating a minor change
    minor_pattern: "(MINOR)"
    # A string to determine the format of the version output
    format: "${major}.${minor}.${patch}-prerelease.${increment}"
    # Path to check for changes. If any changes are detected in the path the 'changed' output will true. Enter multiple paths separated by spaces.
    change_path: "src/my-service"