Skip to content

Commit

Permalink
Merge pull request #9 from Codeneos/feature/automated_releases
Browse files Browse the repository at this point in the history
Support for automated deploy on tags from Travis CI
  • Loading branch information
Codeneos authored Mar 12, 2019
2 parents 614f654 + 2c08473 commit d55a617
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d55a617

Please sign in to comment.