workflow: rules: # For merge requests, create a pipeline. - if: '$CI_MERGE_REQUEST_IID' # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.). - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # For tags, create a pipeline. - if: '$CI_COMMIT_TAG' .test_template: &test_definition stage: test script: - gem install bundler - bundle install - bundle exec rake verify build install test:2.7: image: ruby:2.7 <<: *test_definition test:2.6: image: ruby:2.6 <<: *test_definition test:2.5: image: ruby:2.5 <<: *test_definition deploy: stage: deploy script: - tools/deploy-rubygem.sh only: - tags release: stage: deploy script: - tools/update-changelog.rb "${CI_COMMIT_TAG}" only: - tags