From 39de2e5a0da749ba48c1353759ed65d169a5e3fa Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Wed, 4 Oct 2017 13:09:11 -0400 Subject: [PATCH] Configure .travis.yml to publish l10n (#3) Add .travis.yml, configured to use travis build stages. Releases should only happen if the branch is one listed in RELEASE_BRANCHES (set up in travis env variable) --- .travis.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..43c9f8fd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +language: node_js +node_js: +- 6 +- node +cache: + directories: + - node_modules +jobs: + include: + - stage: npm release + if: branch IN (env(RELEASE_BRANCHES)) + node_js: 6 + script: npm run build + before_deploy: + - npm --no-git-tag-version version $($(npm bin)/json -f package.json version)-prerelease.$(date +%s) + - git config --global user.email $(git log --pretty=format:"%ae" -n1) + - git config --global user.name $(git log --pretty=format:"%an" -n1) + deploy: + provider: npm + skip_cleanup: true + email: $NPM_EMAIL + api_key: $NPM_TOKEN +