mirror of
https://github.com/drone-plugins/drone-npm.git
synced 2026-06-04 18:23:52 +08:00
Updating docs
This commit is contained in:
@@ -4,33 +4,40 @@ The following parameters are used to configuration the publishing:
|
||||
|
||||
* **username** - the username for the account to publish with.
|
||||
* **password** - the password for the account to publish with.
|
||||
* **token** - the deploy token to publish with.
|
||||
* **email** - the email address associated with the account to publish with.
|
||||
* **registry** - the registry URL to use (https://registry.npmjs.org by default)
|
||||
* **folder** - the folder, relative to the workspace, containing the library
|
||||
(uses the workspace directory, by default)
|
||||
* **always_auth** - forces npm to require authentication when accessing the
|
||||
registry (false by default)
|
||||
|
||||
The following is a sample NPM configuration in your .drone.yml file which
|
||||
can publish to the global npm registry:
|
||||
can publish to the global NPM registry:
|
||||
|
||||
```yaml
|
||||
publish:
|
||||
npm:
|
||||
username: $$NPM_USERNAME
|
||||
password: $$NPM_PASSWORD
|
||||
email: $$NPM_EMAIL
|
||||
npm:
|
||||
username: ${NPM_USERNAME}
|
||||
password: ${NPM_PASSWORD}
|
||||
email: ${NPM_EMAIL}
|
||||
```
|
||||
|
||||
For a private npm registry, such as
|
||||
For a private NPM registry, such as
|
||||
[Sinopia](https://github.com/rlidwka/sinopia) the following config can be used:
|
||||
|
||||
```yaml
|
||||
publish:
|
||||
npm:
|
||||
username: $$NPM_USERNAME
|
||||
password: $$NPM_PASSWORD
|
||||
email: $$NPM_EMAIL
|
||||
registry: "http://myregistry:4873"
|
||||
always_auth: true
|
||||
npm:
|
||||
username: ${NPM_USERNAME}
|
||||
password: ${NPM_PASSWORD}
|
||||
email: ${NPM_EMAIL}
|
||||
registry: "http://myregistry:4873"
|
||||
```
|
||||
|
||||
For an [NPM Enterprise registry](https://www.npmjs.com/enterprise) the deploy
|
||||
key option should be used. See the
|
||||
[documentation](http://blog.npmjs.org/post/106559223730/npm-enterprise-with-github-2fa)
|
||||
for how to create the token when using GitHub integration.
|
||||
|
||||
```yaml
|
||||
npm:
|
||||
token: ${NPM_TOKEN}
|
||||
registry: "http://myregistry:8081"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user