From 4803be2df93bd5948ecf8a3089ce2ceec9e9288b Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Fri, 28 Feb 2020 21:59:01 +0100 Subject: [PATCH] Add necessary changes for NPM publishing (#3021) --- .npmignore | 25 +++++++++++++++++++++++++ README.md | 3 +++ azure-pipelines.yaml | 8 ++++++++ 3 files changed, 36 insertions(+) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..ffb42a25 --- /dev/null +++ b/.npmignore @@ -0,0 +1,25 @@ +#tests +test +coverage + +#build tools +.travis.yml +.jenkins.yml +.codeclimate.yml +.github +azure-pipelines.yaml + +#linters +.jscsrc +.jshintrc +.eslintrc* +.dockerignore +.eslintignore + +#editor settings +.vscode + +#src +docs +docker +images diff --git a/README.md b/README.md index f58b926b..990bbcb4 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,9 @@ + + +

Zigbee2mqtt 🌉 🐝

diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 7bc5049d..5b68f916 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -25,6 +25,14 @@ steps: - bash: npm run eslint displayName: 'Lint' +# NPM +- task: Npm@1 + inputs: + command: publish + publishEndpoint: npm + displayName: 'Publish to npm' + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), ne(variables['Build.Reason'], 'PullRequest')) + # Docker - task: DockerInstaller@0 displayName: Docker install