From 06e2c58588ea830dfe345054f7d4b76cd9904b3c Mon Sep 17 00:00:00 2001 From: Oliver Roick Date: Sat, 26 Jan 2019 14:23:34 +0100 Subject: [PATCH] Have TravisCI release to NPM --- .travis.yml | 24 ++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7b61f02..8c0277e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,3 +11,27 @@ jobs: - stage: Lint node_js: "10" script: npm run lint + - stage: NPM release + if: tag IS PRESENT + repo: oliverroick/Leaflet.Deflate + node_js: "10" + script: + - npm run dist + skip_cleanup: true + before_deploy: + - PACKAGE_VERSION=$(node -p -e "require('./package.json').version") + - echo $PACKAGE_VERSION + - | + if [[ "$PACKAGE_VERSION" != "$TRAVIS_TAG" ]]; then + echo "Git and NPM versions do not match. Have you updated package.json?" + exit 1 + fi; + deploy: + provider: npm + email: + secure: aux4It7cNWlCTlzCpPSeN+9Bnb3UoootwCvmPMaI6Ph3CQ2SR0s/h/GGrQWDR4d3JciAD900wO8NsufEQEh3v70mouheCQH29DcR0m7AWSfClIccWFeAryTrBETIMYYBSaDMPPgDhBC/gqLxLbtKHer/8Nf3mkZnuwleu6el5vo= + api_key: + secure: fA5fkaReEVVR9iXM2BrLU4prTF2QbcDrUKfKvCe/XL0ByspZTxm3N9ETz6RqQKcKAO9UFCG88slookW2V9XXDPFyc5glPAzDTAu8yJr0ft4iR2zj54yWm6VILb+d1TM+liMA3lGzIpoJe6JX0iVrSJ0MgtHgbQrOXR44uV4UZTg= + on: + tags: true + repo: oliverroick/Leaflet.Deflate diff --git a/package.json b/package.json index 3113d01..6affd3f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Leaflet.Deflate", "author": "Oliver Roick", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "description": "Deflates lines and polygons to a marker when their screen size becomes too small in lower zoom levels.", "license": "Apache-2.0", "repository": "git://github.com/oliverroick/Leaflet.Deflate",