image: ruby:latest stages: - test - publish variables: SSH_AUTH_SOCK: "/ssh-agent" before_script: - mkdir -p /root/.ssh && ssh-keyscan -H codevault.io > /root/.ssh/known_hosts 2>/dev/null - bundle config jobs 8 - bundle install --path=/tmp/bundler --quiet rubocop: stage: test script: - bundle exec rubocop publish_gem: stage: publish script: - mkdir ~/.gem - | cat << EOF > ~/.gem/credentials --- :rubygems_api_key: ${RUBYGEMS_API_KEY} EOF - chmod 0600 ~/.gem/credentials - gem build aroundhome_cops.gemspec - gem push $(find `pwd` -name "aroundhome_cops-*.gem") only: - master