.gitlab-ci.yml in gitlab-styles-3.3.0 vs .gitlab-ci.yml in gitlab-styles-3.4.0
- old
+ new
@@ -1,13 +1,45 @@
-image: ruby:2.3
+stages:
+ - release
+ - test
-before_script:
- - bundle --version
- - bundle install
+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