diff --git a/.travis.yml b/.travis.yml index 63c8c4c0..2e8c3cab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,11 @@ addons: secure: $SONAR_TOKEN env: - - TEST_RESULTS_FILE=test-results.xml + global: + - TEST_RESULTS_FILE=test-results.xml before_install: - - export DISPLAY=:99.0 + - export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start install: @@ -28,4 +29,22 @@ script: - npm test - npm run lint -- -o tslint-report.json --format json - sonar-scanner + +before_deploy: + - export PACKAGE_VERSION=$(node -p "require('./package.json').version") - npm run package + +deploy: + - provider: releases + api_key: $GITHUB_TOKEN + file_glob: true + file: "*.vsix" + skip_cleanup: true + name: "Version $PACKAGE_VERSION" + on: + tags: true + - provider: script + script: npm run publish -- -p $VSCE_TOKEN --packagePath *.vsix + skip_cleanup: true + on: + tags: true \ No newline at end of file diff --git a/package.json b/package.json index 993e26b3..1f8ee032 100644 --- a/package.json +++ b/package.json @@ -235,6 +235,7 @@ "lint": "tslint -p .", "test": "node ./node_modules/vscode/bin/test", "postinstall": "node ./node_modules/vscode/bin/install", + "bump": "npm version patch -m \"Bumping to %s\"", "modclean": "node ./build/removeFiles . .vscodeignore", "package": "vsce package", "publish": "vsce publish",