diff --git a/.travis.yml b/.travis.yml index 6f9d1a82..8b09d563 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,19 @@ jobs: - npm run test - stage: deploy - name: "NPM Package" + name: "Git tag" + if: branch = master + + before_deploy: + - git config --local user.name "$GITHUB_USERNAME" + - git config --local user.email "$GITHUB_EMAIL" + - export PACKAGE_VERSION=$(cat package.json | grep 'version' | sed 's/[ \",:]//g' | sed 's/version//') + - git tag $PACKAGE_VERSION + deploy: + provider: releases + api_key: "$GITHUB_TOKEN" + skip_cleanup: true + - name: "NPM Package" language: node_js node_js: 8 if: branch = master