summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora14m <[email protected]>2020-12-09 16:31:34 +0000
committera14m <[email protected]>2020-12-09 16:31:34 +0000
commit261cd75a0a2277e05ce66e2b53a23b5151e5775a (patch)
tree883476dc1796c0bfcd8ed32460972e5b142059c8
parent457f78b6d27ebded45635bbf1be4c5af1bef531c (diff)
parentfbf4247ee72fe635cac87c3d44ca593671196cf3 (diff)
Merge branch 'feature/gem-release' into 'master'
Configure Gem releases See merge request a14m/game-of-life!4
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--CLI/ruby/.gitlab-ci.yml14
-rw-r--r--CLI/ruby/README.md8
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)