diff --git a/.travis.yml b/.travis.yml index d92946e8..619cea03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,3 +34,19 @@ before_script: # Build and check this project script: - ./autogen.sh && ./configure --with-libsodium --prefix=${BUILD_PREFIX} && make distcheck + +# Deploy tags +before_deploy: +- . ./ci_deploy.sh +deploy: + provider: releases + api_key: + secure: "VIOyO6gR+E4PH9i48eq8gF15PYTZamUOLwbaa4nnwCgmKy+iiwIrXBF/FZ9SdzjeUUSrK0v1gAfC389U+ZBjdD0NQTcSZ9UngvSALgtI7w4gQMJ09G74Sowcm21PIO/Pn3V4xpO0ciJ7xb2aGP6zhbGOiK/nmv8MXUM/PzxvH6A=" + file_glob: true + file: ${ZEROMQ4X_DEPLOYMENT} + skip_cleanup: true + on: + repo: zeromq/zeromq4-x + branch: master + tags: true + condition: "$TRAVIS_OS_NAME =~ (linux)" diff --git a/ci_deploy.sh b/ci_deploy.sh new file mode 100755 index 00000000..38606bfb --- /dev/null +++ b/ci_deploy.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -x +set -e + +if [[ $TRAVIS_OS_NAME =~ (linux) ]]; then + # Tell travis to deploy all files in dist + mkdir dist + export ZEROMQ4X_DEPLOYMENT=dist/* + # Move archives to dist + mv *.tar.gz dist + mv *.zip dist + # Generate hash sums + cd dist + md5sum *.zip *.tar.gz > MD5SUMS + sha1sum *.zip *.tar.gz > SHA1SUMS + cd - +else + export ZEROMQ4X_DEPLOYMENT="" +fi