commit 0c9f7d4ab9c4e3fb0020ade0063f7dfc1c90be42 parent 3310c8443be8a5af94f06fb04552efaf1fd38404 Author: finwo <finwo@pm.me> Date: Mon, 22 Oct 2018 16:38:10 +0200 This should auto-deploy Diffstat:
| M | .gitlab-ci.yml | | | 15 | +++++++++++++++ |
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml @@ -1,8 +1,23 @@ image: node:10.11.0 +cache: + paths: + - node_modules/ + +stages: + - test + - deploy + tests: + stage: test script: - git submodule update --init --recursive - npm rebuild - npm install - npm test + +deploy: + stage: deploy + script: + - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + - if [ $(npm view $(node -p "require('./package.json').name") version) != $(node -p "require('./package.json').version") ]; then npm publish ; fi