mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-27 04:58:17 +00:00
parent
305899e7da
commit
7b71828c01
1 changed files with 4 additions and 4 deletions
8
guide.md
8
guide.md
|
|
@ -78,7 +78,7 @@ Alternately, you can override the branch pattern.
|
||||||
|
|
||||||
## Namespace Services / "Monorepo" Support
|
## Namespace Services / "Monorepo" Support
|
||||||
|
|
||||||
If your project contains multiple services which you wish to version independently, you can use the `namespace` and `change_path` inputs to provide a version for a specific service which increments only when a file in the specified path is changed.
|
If your project contains multiple services which you wish to version independently, you can use the `namespace` and `change_path` inputs to provide a version for a specific service which increments only when a file in the specified path is changed. (Or, if you are only build on push/pull requests you can just use the GitHub Action's [`paths`/`paths-ignore`](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushpull_requestpull_request_targetpathspaths-ignore) feature to block the trigger itself and run the workflow only when files in a specific path are changed. In contrast this method will also work on other triggers like `workflow_dispatch`.)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- id: version
|
- id: version
|
||||||
|
|
@ -87,7 +87,7 @@ If your project contains multiple services which you wish to version independent
|
||||||
change_path: "src/my-service"
|
change_path: "src/my-service"
|
||||||
namespace: my-service
|
namespace: my-service
|
||||||
- name: Cancel if Unchanged
|
- name: Cancel if Unchanged
|
||||||
if: ${{ ! steps.version.outputs.changed }}
|
if: ${{ ! fromJSON(steps.version.outputs.changed) }}
|
||||||
run: |
|
run: |
|
||||||
gh run cancel ${{ github.run_id }}
|
gh run cancel ${{ github.run_id }}
|
||||||
gh run watch ${{ github.run_id }}
|
gh run watch ${{ github.run_id }}
|
||||||
|
|
@ -100,7 +100,7 @@ If your project contains multiple services which you wish to version independent
|
||||||
| Value | Description |
|
| Value | Description |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `tag_prefix` | The prefix to use for the tag. Defaults to `v`, generally you will use either `v` or an empty string. Note that the tag format is distinct from the version. Tags used for versioning must always follow the pattern `{tag_prefix}{major}.{minor}.{patch}` with and optional `-{namespace}` suffix. |
|
| `tag_prefix` | The prefix to use for the tag. Defaults to `v`, generally you will use either `v` or an empty string. Note that the tag format is distinct from the version. Tags used for versioning must always follow the pattern `{tag_prefix}{major}.{minor}.{patch}` with and optional `-{namespace}` suffix. |
|
||||||
| `major_pattern` and `minor_pattern` | These strings are used to determine the type of version to create. If any commit message sincematches the `major_pattern` the major version will be incremented, if it matches the `minor_pattern` the minor version will be incremented. If neither pattern matches, the patch version will be incremented. These can be specified either as strings or as regular expression by wrapping the expression in `/`. |
|
| `major_pattern` and `minor_pattern` | These strings are used to determine the type of version to create. If any commit message since matches the `major_pattern` the major version will be incremented, if it matches the `minor_pattern` the minor version will be incremented. If neither pattern matches, the patch version will be incremented. These can be specified either as strings or as regular expression by wrapping the expression in `/`. The defaults follow [Conventional Commits](https://www.conventionalcommits.org/): `/!:|BREAKING CHANGE:/` for major and `/feat:/` for minor. |
|
||||||
| `version_format` | A value such as `${major}.${minor}.${patch}-prerelease${increment}` that will be used to format the version value of the output, **formatting this value is the only effect of this input parameter!** It is not used for parsing or any other purpose. It is a convenient alternative to formatting the output in a subsequent step. |
|
| `version_format` | A value such as `${major}.${minor}.${patch}-prerelease${increment}` that will be used to format the version value of the output, **formatting this value is the only effect of this input parameter!** It is not used for parsing or any other purpose. It is a convenient alternative to formatting the output in a subsequent step. |
|
||||||
| `user_format_type` | Indicates the format of the `authors` output. Can be `json` or `yaml`. |
|
| `user_format_type` | Indicates the format of the `authors` output. Can be `json` or `yaml`. |
|
||||||
| `enable_prerelease_mode` | If true, major changes to versions starting with 0 will result in a minor change, preventing ths initial version `1.0.0`` from being created automatically by someone checking in a commit with the major pattern. |
|
| `enable_prerelease_mode` | If true, major changes to versions starting with 0 will result in a minor change, preventing ths initial version `1.0.0`` from being created automatically by someone checking in a commit with the major pattern. |
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue