diff --git a/.travis.yml b/.travis.yml index fe09edf..2330830 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,5 +6,13 @@ otp_release: - 19.3 script: - rebar3 ct --readable=false +- rebar3 compile after_success: - rebar3 as test coveralls send +deploy: + provider: script + script: ./hex.sh + skip_cleanup: true + on: + tags: true + otp_release: "22.0" diff --git a/hex.sh b/hex.sh new file mode 100755 index 0000000..1915078 --- /dev/null +++ b/hex.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +## Setup hex user +mkdir -p ~/.hex +echo '{username,<<"'${HEX_USERNAME}'">>}.' > ~/.hex/hex.config +echo '{key,<<"'${HEX_KEY}'">>}.' >> ~/.hex/hex.config + +## Add the rebar3 hex plugin to global +mkdir -p ~/.config/rebar3 +echo '{plugins, [rebar3_hex]}.' > ~/.config/rebar3/rebar.config + +rebar3 hex publish <