|
| 1 | +# Releasing |
| 2 | +This document summarizes the process of doing a new release of this project. |
| 3 | +Release can only be performed by Datadog maintainers of this repository. |
| 4 | + |
| 5 | +## Schedule |
| 6 | +This project does not have a strict release schedule. However, we would make a release at least every 2 months. |
| 7 | + - No release will be done if no changes got merged to the `master` branch during the above mentioned window. |
| 8 | + - Releases may be done more frequently than the above mentioned window. |
| 9 | + |
| 10 | +## Prerelease checklist |
| 11 | +* Check and upgrade dependencies where it applies and makes sense. |
| 12 | + - Create a distinct pull request and test your changes since it may introduce regressions. |
| 13 | + - While using the latest versions of dependencies is advised, it may not always be possible due to potential compatibility issues. |
| 14 | + - Upgraded dependencies should be thoroughly considered and tested to ensure they are safe! |
| 15 | +* Make sure tests are passing. |
| 16 | + - Locally and in the continuous integration system. |
| 17 | +* Manually test changes included in the new release. |
| 18 | +* Make sure documentation is up-to-date. |
| 19 | + |
| 20 | +## Release Process |
| 21 | +### Prerequisite |
| 22 | +Install [bundler](https://bundler.io/) and setup your RubyGems credentials: |
| 23 | +1. Register an account on https://rubygems.org/ |
| 24 | +1. *Datadog Admins only* - Be assigned to Datadog's RubyGems gems by an owner. |
| 25 | +1. Set a `~/.gem/credentials` file as the following: |
| 26 | +``` |
| 27 | +--- |
| 28 | +:rubygems_api_key: $RUBYGEMS_APIKEY |
| 29 | +``` |
| 30 | +1. Install [datadog_checks_dev](https://datadog-checks-base.readthedocs.io/en/latest/datadog_checks_dev.cli.html#installation) using Python 3. |
| 31 | +1. Install [gem-release](https://github.com/svenfuchs/gem-release#installation). |
| 32 | + |
| 33 | +### Update Changelog |
| 34 | +#### Commands |
| 35 | +- See changes ready for release by running `ddev release show changes .` at the root of this project. Add any missing labels to PRs if needed. |
| 36 | +- Run `ddev release changelog . <NEW_VERSION>` to update the `CHANGELOG.md` file at the root of this repository |
| 37 | +- Commit the changes to the repository in a release branch. Do not merge yet. |
| 38 | + |
| 39 | +### Release |
| 40 | +1. Bump the version. e.g. `gem bump -v 1.0.0`. |
| 41 | +1. Merge the PR to master. |
| 42 | +1. Create the release in the [Github releases page](https://github.com/DataDog/datadog-api-client-ruby/releases). |
| 43 | +1. Checkout the tag created at the previous step. |
| 44 | +1. Release the gem: `gem release`. |
| 45 | +1. Check that the [Ruby Gem is published](https://rubygems.org/gems/datadog_api_client). |
| 46 | +1. Bump the version again to a dev version (e.g. `gem bump -v 1.0.1+dev`), open a PR and merge it to master. |
0 commit comments