Skip to content

Commit dfd2630

Browse files
committed
DOC: update making releases to describe process using release branches
1 parent 75d5503 commit dfd2630

1 file changed

Lines changed: 39 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ The version tag should also start with `v` e.g. `v2.4.0`.
324324
`bilby` uses `setuptools_scm` to automatically set the version based on git tags.
325325
This means no manual changes are needed to the version number are required.
326326

327+
As on version v2.6.0, `bilby` uses a [stable mainline](https://www.bitsnbites.eu/a-stable-mainline-branching-model-for-git/) branching model for releases.
328+
This means that all major and minor releases should have a corresponding branch `release/X.Y.x`.
329+
327330
### Updating the changelog
328331

329332
Before making a release, the [changelog](https://github.com/bilby-dev/bilby/blob/main/CHANGELOG.md)
@@ -337,6 +340,40 @@ When making a changelog keep the following in mind:
337340
- Include links to the relevant PRs
338341
- Remember to update the URLs at the bottom of changelog file
339342

343+
### Tagging a release
344+
345+
#### Major and minor releases
346+
347+
If making a major or minor release you must first make the release branch from the current `main` branch
348+
349+
```bash
350+
git checkout -b release/2.6.x
351+
git push upstream release/2.6.x
352+
```
353+
354+
**Note:** this assume you have add the `bilby-dev/bilby` repository as `upstream`
355+
356+
#### Bug-fix releases
357+
358+
If making a bugfix release, the relevant commits should be cherry-picked and merged
359+
into the release branch.
360+
361+
**Note:** make sure the changelog is up-to-date.
362+
363+
#### Adding the tag
364+
365+
Make sure you have the release branch checked out and up-to-date, then tag the release
366+
367+
```bash
368+
git tag v2.6.0
369+
```
370+
371+
Once it is tagged, it should be pushed to the `bilby-dev/bilby` repository.
372+
373+
```bash
374+
git push upstream v2.6.0
375+
```
376+
340377
### Making the release on GitHub
341378

342379
**Note:** releases will automatically be pushed to PyPI and versions on PyPI
@@ -346,9 +383,8 @@ Once the changelog has been updated, follow these steps for making a release:
346383

347384
1. Navigate to https://github.com/bilby-dev/bilby/releases.
348385
2. Click `Draft new release`.
349-
3. Select an existing tag that does not have a release or specify the name of a
350-
new tag that will be made when the release is made.
351-
4. Specify the version as the title, e.g. `v2.4.0`.
386+
3. Select an existing tag that does not have a release
387+
4. Specify the version as the title, e.g. `v2.6.0`.
352388
5. Copy the relevant section from the changelog and include a link to the full changelog, e.g.
353389
`**Full Changelog:** https://github.com/bilby-dev/bilby/compare/<previous-release>...<this-release>`
354390
6. If this is latest stable release, make sure `Set at latest release` is checked.

0 commit comments

Comments
 (0)