File: RELEASING.md

package info (click to toggle)
ruby-git 1.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 4,124 kB
  • sloc: ruby: 5,385; sh: 507; perl: 64; makefile: 6
file content (70 lines) | stat: -rw-r--r-- 2,238 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!--
# @markup markdown
# @title Releasing
-->

# How to release a new git.gem

Releasing a new version of the `git` gem requires these steps:

- [How to release a new git.gem](#how-to-release-a-new-gitgem)
  - [Install Prerequisites](#install-prerequisites)
  - [Prepare the Release](#prepare-the-release)
  - [Review and Merge the Release](#review-and-merge-the-release)
  - [Build and Release the Gem](#build-and-release-the-gem)

These instructions use an example where:

- The default branch is `master`
- The current release version is `1.5.0`
- You want to create a new *minor* release, `1.6.0`

## Install Prerequisites

The following tools need to be installed in order to create the release:

- [git](https://git-scm.com) is used to interact with the local and remote repositories
- [gh](https://cli.github.com) is used to create the release and PR in GitHub
- [Docker](https://www.docker.com) is used to run the script to create the release notes

On a Mac, these tools can be installed using [brew](https://brew.sh):

```shell
$ brew install git
...
$ brew install gh
...
$ brew install --cask docker
...
$
```

## Prepare the Release

Bump the version, create release notes, tag the release and create a GitHub release and PR which can be used to review the release.

Steps:

- Check out the code with `git clone https://github.com/ruby-git/ruby-git ruby-git-v1.6.0 && cd ruby-git-v1.6.0`
- Install development dependencies using bundle `bundle install`
- Based upon the nature of the changes, decide on the type of release: `major`, `minor`, or `patch` (in this example we will use `minor`)
- Run the release script `bundle exec create-github-release minor`

## Review and Merge the Release

Have the release PR approved and merge the changes into the `master` branch.

**IMPORTANT** DO NOT merge to the `master` branch using the GitHub UI. Instead use the instructions below.

Steps:

- Get the release PR reviewed and approved in GitHub
- Merge the changes with the command `git checkout master && git merge --ff-only v1.6.0 && git push`

## Build and Release the Gem

Build the gem and publish it to [rubygems.org](https://rubygems.org/gems/git)

Steps:

- Build and release the gem using rake `bundle exec rake release`