diff --git a/.travis.yml b/.travis.yml index e1d83e75dd..8945540fd6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -109,3 +109,30 @@ script: else make $MAKE_TARGETS && make $MAKE_TEST_TARGET && if [ $BUILD_EXTERNAL == "1" ]; then make install; fi fi + +after_success: + # Create tarball for deployment + - if [[ "${BUILD_EXTERNAL}" == "1" && "${SHARED_LIBS}" == "ON" && "${repo_token}" != "" ]]; then + export TAG=7.0.1-1; + export TARBALL=SPIRV-LLVM-Translator-${TAG}-${TRAVIS_OS_NAME}-${BUILD_TYPE}.zip; + cd ../install && find . -print | zip -@ ${TARBALL}; + fi + +before_deploy: + # Travis CI relies on the tag name to push to the correct release. + - git config --global user.name "Travis CI" + - git config --global user.email "builds@travis-ci.org" + - git tag -f ${TAG} + - git push https://${repo_token}@github.com/${TRAVIS_REPO_SLUG} --tags + +deploy: + provider: releases + api_key: ${repo_token} + on: + branch: llvm_release_70 + condition: ${BUILD_EXTERNAL} == 1 && ${SHARED_LIBS} == ON && ${repo_token} + file: ${TARBALL} + skip_cleanup: true + overwrite: false + prerelease: false +