You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-19Lines changed: 35 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,52 +16,69 @@ you'll need to configure that workflow yourself. You can look to the
16
16
17
17
- Check for the latest version number published to npm.
18
18
- Lookup all commits between the git commit that triggered the action and the latest publish.
19
-
- If the package hasn't been published or the prior publish does not include a git hash, we'll
20
-
only pull the commit data that triggered the action.
21
-
- Based on the commit messages, increment the version from the lastest release.
22
-
- If the strings "BREAKING CHANGE" or "!:" are found anywhere in any of the commit messages or descriptions the major
23
-
version will be incremented.
24
-
- If a commit message begins with the string "feat" then the minor version will be increased. This works
25
-
for most common commit metadata for feature additions: `"feat: new API"` and `"feature: new API"`.
19
+
- Note: The package needs to have an initial publish in order to pull the package details.
20
+
- Based on the commit messages, increment the version from the latest release.
21
+
- If the strings "BREAKING CHANGE" is found anywhere in any of the commit messages, or "!:" is found in the first line or a commit message starts with one of the provided major tags (optional), then the major version will be incremented.
22
+
- If a commit message begins with the string "feat" (or a tag in the minor tags list) then the minor version will be increased. This works for most common commit metadata for feature additions: `"feat: new API"` and `"feature: new API"`.
26
23
- All other changes will increment the patch version.
27
-
- Publish to npm using the configured token.
24
+
- Publish to npm (or the provided registry url) using the configured token.
28
25
- Push a tag for the new version to GitHub.
29
26
30
27
### Configuration
31
28
32
-
You can configure some aspects of merge-release action by passing some environmental variables.
29
+
You can configure some aspects of merge-release action by using the `with` properties on the action or passing some environmental variables.
33
30
34
31
-**GITHUB_TOKEN (required)**
35
32
- Github token to allow tagging the version.
36
33
-**NPM_AUTH_TOKEN (required)**
37
-
- NPM Auth Token to publish to NPM, read [here](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) how to setup it as a secret.
34
+
- NPM Auth Token to publish to the registry, read [here](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) how to setup it as a secret.
38
35
-**DEPLOY_DIR**
39
-
- The path where the dist `package.json` is to run npm publish. Defaults to the root dir.
36
+
- The path where the dist `package.json` is to run npm publish. Defaults to the root dir. This is a relative file path, relative to the root of the repo.
40
37
-**SRC_PACKAGE_DIR**
41
-
- The path where the src package.json is found. Defaults to the root dir.
38
+
- The path where the src `package.json` is found. Defaults to the root dir. This is a relative file path, relative to the root of the repo.
42
39
-**NPM_REGISTRY_URL**
43
-
- NPM Registry URL to use. defaults to: `https://registry.npmjs.org/`
40
+
- NPM Registry URL to use. defaults to: `https://registry.npmjs.org/`. Set it to `https://npm.pkg.github.com` for GitHub Packages.
44
41
-**NPM_PRIVATE**
45
42
- If you wish privately publish your package please ensure you have set this to `true`
43
+
-**DISABLE_GIT_TAG**
44
+
- If you wish to skip setting the git tag, set this to `true`
45
+
-**MAJOR_TAGS**
46
+
- A list of tags to check for when considering whether to perform a major version update. The value is a list separated by the `|` character. i.e. `major|my-major-tag`
47
+
-**MINOR_TAGS**
48
+
- Override the list of tags to check for when considering whether to perform a minor version update. The value is a list separated by the `|` character. i.e. `feat|minor|my-minor-tag`
46
49
47
-
`merge-release` will use `npm publish` unless you've defined a `publish` script in your `package.json`.
50
+
Note: `merge-release` will use `npm publish` by default; but if you've defined a `publish` script in your `package.json` it will use that instead.
0 commit comments