#!/bin/sh set -ex # Set up .netrc file with GitHub credentials git_setup() { cat <<-EOF >$HOME/.netrc machine github.com login $GITHUB_ACTOR password $GITHUB_TOKEN machine api.github.com login $GITHUB_ACTOR password $GITHUB_TOKEN EOF chmod 600 $HOME/.netrc } git_setup # Overzealous validation stops rake release from running without a credentials file touch ~/.gem/credentials mkdir -p tmp cp /release/Rakefile tmp/Rakefile cd tmp bundle exec rake release