Skipping deployment with npm provider as this branch is not allowed to deploy
I am trying to build and deploy my npm package in the npm registry automatically when pushing to the master branch.
Here is my content .travis.yml
:
language: node_js
node_js:
- '0.11'
- '0.10'
deploy:
provider: npm
api_key:
secure: XXX
on:
tags: true
branch: master
The build succeeds, but the deployment finishes with the message:
Skipping deploy with npm provider because this branch is not allowed to deploy.
Why? I've tried both without specifying any branch and explicitly specifying the "master" branch.
Learn more about the travis build state .
Any suggestion / clue for solving this problem is appreciated. Thanks in advance.
source to share
With, tags: true
you indicate that only tagged tags will be expanded only. If I'm not mistaken, Travis CI does not explicitly check which branch such a commit is enabled on. So either point tags: true
or make a tagged commit, or point branch: master
and commit that branch to trigger the deployment.
But using both operators won't work.
You can find a note in the Travis CI documentation (similar for GitHub ):
tags
: If settrue
, the application is deployed when the tag is applied to a commit. (Due to a known issue , you must install as wellall_branches: true
.)
So, the correct answer is to either specify a branch OR use tags: true
and all_branches: true
.
If you are using GitHub:
Please note that deploying GitHub releases only works for tags , not branches.
source to share