From 5ad9a438e322c14e0558702b5cfb77ea07e53e30 Mon Sep 17 00:00:00 2001 From: Don Date: Fri, 24 Jun 2016 18:42:39 -0700 Subject: [PATCH] Updating docs --- DOCS.md | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/DOCS.md b/DOCS.md index 0366535..a960b34 100644 --- a/DOCS.md +++ b/DOCS.md @@ -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" ```