Skip to content

Commit

Permalink
Add necessary changes for NPM publishing (Koenkk#3021)
Browse files Browse the repository at this point in the history
  • Loading branch information
X-dark authored Feb 28, 2020
1 parent 05766fa commit 4803be2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
<a href="https://www.codacy.com/manual/Koenkk/zigbee2mqtt?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Koenkk/zigbee2mqtt&amp;utm_campaign=Badge_Grade">
<img src="https://api.codacy.com/project/badge/Grade/24f1e0fe39f04daa810e8a1416693d3f">
</a>
<a href="https://www.npmjs.com/package/zigbee2mqtt">
<img src="https://img.shields.io/npm/v/zigbee2mqtt">
</a>
</div>
<h1>Zigbee2mqtt 🌉 🐝</h1>
<p>
Expand Down
8 changes: 8 additions & 0 deletions azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4803be2

Please sign in to comment.