stages: - release - test default: image: ruby:2.6 tags: - gitlab-org before_script: - bundle --version - bundle install 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 == "master"' # For tags, create a pipeline. - if: '$CI_COMMIT_TAG' styles: stage: test script: - bundle exec rubocop --debug --parallel specs: stage: test script: - bundle exec rspec release: stage: release rules: - if: '$CI_COMMIT_TAG' script: - gem update --system - ruby --version - gem env version - gem build gitlab-styles.gemspec - gem push gitlab-styles*.gem artifacts: paths: - gitlab-styles*.gem expire_in: 30 days