image: alpine/latest packages: - ruby - ruby-dev - ruby-bundler sources: - https://git.sr.ht/~a14m/game-of-life secrets: # RUBY GEMS CREDENTIALS - 3bf42fd4-1985-48db-8790-1f61cde29671 tasks: - install: | cd game-of-life/CLI/ruby bundle install -j $(nproc) - test: | cd game-of-life/CLI/ruby bundle exec rspec --format progress - lint: | cd game-of-life/CLI/ruby bundle exec rubocop - release: | set +x REF=`git describe --exact-match --tags HEAD ||:` if [[ ! `echo $REF | awk '/^ruby\/v.*$/'` ]]; then echo "Skipping release step. no matching tag" exit 0 fi echo "Publishing release $REF" cd game-of-life/CLI/ruby bundle exec rake clean bundle exec rake clobber bundle exec rake build bundle exec gem push pkg/terminal_game_of_life-*.gem