README.md in gfsm-0.2.0 vs README.md in gfsm-0.3.0

- old
+ new

@@ -54,10 +54,47 @@ At the moment there's no built-in testing platform, but I'm planning to use `rspec` to add unit tests. ### Using -There are two ways to run this tool locally at the moment: +This project is available as a Ruby gem, so to be able to use it is enough to run ```shell -./bin/gfsm [args] -``` +gem install gfsm +``` + +Once that command completes, the gem will be available and you can invoke it from the command line with + +```shell +gfsm help +``` + +The main way this project can be used though, is inside a CI pipeline where you can invoke it to bump the version and/or update the changelog. + +In order to use is inside a CI job, the job itself could look something like this: + +```yaml +stages: + - version + +update-version: + stage: version + image: ruby:2.7.5 + before_script: + - gem install gfsm + script: + - gfsm version bump --force > .version + - gfsm changelog --force --output-file CHANGELOG.md + - echo "RELEASE_VERSION=$(<.version)" >> variables.env + artifacts: + reports: + dotenv: variables.env + paths: + - .version + - CHANGELOG.md +``` + +With this, subsequent jobs that depend on the `update-version` job will: +- be able to get the new version form the `RELEASE_VERSION` environment variable +- read the `CHANGELOG.md` file to get an updated changelog file + +To have a working example of the things described above you can have a look at the `.gitlab-ci.yml` of this project, which implements this exact concept. \ No newline at end of file