The following config declares the
deploy job that run on all branches. The job will either release:
- a new
canarybuild from a pull request (if your package manager plugin implements them)
language: node_js node_js: "10" git: depth: false script: - yarn lint - yarn test - yarn build deploy: - provider: script script: if [ "$GH_TOKEN" != "false" ];then npx auto shipit; fi; skip-cleanup: true on: all_branches: true
If you are having problems make sure you have done the following:
- Any other secrets for plugins are set (Ex;
NPM_TOKENwith the NPM plugin)
Some plugins might use tools that require you to be on a branch.
The default setup for travis leaves you in a "Detached Head" state, meaning the git HEAD pointer is not on a branch.
To fix this add the following lines to your
before_deploy: - if [ "$TRAVIS_BRANCH" == "master" ];then git checkout master; fi;
This code will ensure that your git HEAD is on master when creating a new release.
By default Travis will not pass secrets to forks. Because of this canaries releases will fail. You can either:
- Pass secrets to forks (insecure)
- Only run shipit if secrets are available (recommended, in above config)