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
`npmPublish` can be set to `false` to skip the publishing on npm registry
If `tarballDir` is set the npm tarball (`npm pack`) will be generated in the configured directory
Copy file name to clipboardExpand all lines: README.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,19 @@ Determine the last release of the package on the `npm` registry.
16
16
17
17
## publish
18
18
19
-
Publish the package on the `npm` registry.
19
+
Update the `package.json` version, [create](https://docs.npmjs.com/cli/pack) the `npm` package tarball and [publish](https://docs.npmjs.com/cli/publish) to the `npm` registry.
20
20
21
21
## Configuration
22
22
23
-
### Environment variables
23
+
### Npm registry authentication
24
24
25
-
The `npm` authentication configuration is **required** and can be set via environment variables.
25
+
The `npm` authentication configuration is **required** and can be set via [environment variables](#environment-variables).
26
26
27
27
Both the [token](https://docs.npmjs.com/getting-started/working_with_tokens) and the legacy (`username`, `password` and `email`) authentication are supported. It is recommended to use the [token](https://docs.npmjs.com/getting-started/working_with_tokens) authentication. The legacy authentication is supported as the alternative npm registries [Artifactory](https://www.jfrog.com/open-source/#os-arti) and [npm-registry-couchapp](https://github.com/npm/npm-registry-couchapp) only supports that form of authentication at this point.
|`npmPublish`| Whether to publish the `npm` package to the registry. If `false` the `package.json` version will still be updated. |`true`|
45
+
|`tarballDir`| Directory path in which to generate the the package tarball. If `false` the tarball is not be kept on the file system. |`false`|
46
+
47
+
### Npm configuration
48
+
40
49
The plugins are based on `npm` and will use the configuration from [`.npmrc`](https://docs.npmjs.com/files/npmrc). See [npm config](https://docs.npmjs.com/misc/config) for the option list.
41
50
42
51
The [`registry`](https://docs.npmjs.com/misc/registry) and [`dist-tag`](https://docs.npmjs.com/cli/dist-tag) can be configured in the `package.json` and will take precedence over the configuration in `.npmrc`:
@@ -54,6 +63,7 @@ The [`registry`](https://docs.npmjs.com/misc/registry) and [`dist-tag`](https://
54
63
The plugins are used by default by [semantic-release](https://github.com/semantic-release/semantic-release) so no specific configuration is requiered to use them.
55
64
56
65
Each individual plugin can be disabled, replaced or used with other plugins in the `package.json`:
66
+
57
67
```json
58
68
{
59
69
"release": {
@@ -63,3 +73,25 @@ Each individual plugin can be disabled, replaced or used with other plugins in t
63
73
}
64
74
}
65
75
```
76
+
77
+
The `npmPublish` and `tarballDir` option can be used to skip the publishing to the `npm` registry and instead, release the package tarball with another plugin. For example with the [github](https://github.com/semantic-release/github):
// If the npm publish plugin is used and has `npmPublish` or `tarballDir` configured, validate them now in order to prevent any release if the configuration is wrong
0 commit comments