diff options
| -rw-r--r-- | .gitlab-ci.yml | 4 | ||||
| -rw-r--r-- | CLI/ruby/.gitlab-ci.yml | 14 | ||||
| -rw-r--r-- | CLI/ruby/README.md | 8 |
3 files changed, 22 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 49038d5..4926962 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,9 +7,5 @@ ruby: include: CLI/ruby/.gitlab-ci.yml strategy: depend only: - refs: - - master - - branches - - merge_requests changes: - CLI/ruby/* diff --git a/CLI/ruby/.gitlab-ci.yml b/CLI/ruby/.gitlab-ci.yml index f96599c..cc795d6 100644 --- a/CLI/ruby/.gitlab-ci.yml +++ b/CLI/ruby/.gitlab-ci.yml @@ -44,3 +44,17 @@ lint: policy: pull script: - bundle exec rubocop + +release: + stage: release + needs: [test, lint] + rules: + - if: $CI_COMMIT_TAG =~ /^ruby\/v.*$/ + cache: + <<: *cache + policy: pull + script: + - bundle exec rake release + release: + tag_name: $CI_COMMIT_TAG + description: "Release: $CI_COMMIT_TAG" diff --git a/CLI/ruby/README.md b/CLI/ruby/README.md index 5207529..a44511a 100644 --- a/CLI/ruby/README.md +++ b/CLI/ruby/README.md @@ -51,6 +51,14 @@ Run `bundle exec rspec` or `bundle exec rake spec` ## Documentation Run `bundle exec yard` +## Release +- Update the [version](./lib/game_of_live/version.rb) number +- Update the [CHANGELOG](./CHANGELOG.md) +- Create a git(lab) tag `ruby/v#{version_number}` ex: `ruby/v0.1.1-pre` + +The tag will automatically trigger the release workflow after successful build/test +and release the changes to [rubygems.org](https://rubygems.org/gems/terminal_game_of_life) + ## Extra information ### [Contributing](../../CONTRIBUTING.md) ### [License](../../LICENSE.md) |
