version: 2.1 orbs: ruby: circleci/ruby@2.0.0 workflows: version: 2 test-deploy: jobs: - build - deploy: filters: tags: only: /.*/ branches: ignore: /.*/ jobs: build: docker: - image: cimg/ruby:3.1-browsers auth: username: $DOCKERHUB_USER password: $DOCKERHUB_PASSWORD executor: ruby/default steps: - checkout - run: name: Which bundler? command: bundle -v - run: bundle install - run: name: lint command: bundle exec rubocop - run: name: test command: bundle exec rake deploy: docker: - image: cimg/ruby:3.1-browsers working_directory: ~/repo steps: - checkout - run: name: Setup Rubygems command: bash .circleci/setup-rubygems.sh - run: name: Publish to Rubygems command: | gem build alma.gemspec gem push "$(ls alma-*.gem)"