You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+53-3Lines changed: 53 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -324,6 +324,9 @@ The version tag should also start with `v` e.g. `v2.4.0`.
324
324
`bilby` uses `setuptools_scm` to automatically set the version based on git tags.
325
325
This means no manual changes are needed to the version number are required.
326
326
327
+
As of 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
+
327
330
### Updating the changelog
328
331
329
332
Before making a release, the [changelog](https://github.com/bilby-dev/bilby/blob/main/CHANGELOG.md)
@@ -337,6 +340,52 @@ When making a changelog keep the following in mind:
337
340
- Include links to the relevant PRs
338
341
- Remember to update the URLs at the bottom of changelog file
339
342
343
+
### Making the release branch
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
+
##### Via the web interface
350
+
351
+
From the [branches page of the repo](https://github.com/bilby-dev/bilby/branches), click `New branch`,
352
+
select `main` as the source and name the branch `release/Major.Minor.x` for example `release/2.6.x`.
353
+
354
+
##### Via the command line
355
+
356
+
Ensure you have checked out the `main` branch and it is up-to-date with the upstream repo.
357
+
Then run the following commands with the appropriate version number:
358
+
359
+
```bash
360
+
git checkout -b release/2.6.x
361
+
git push upstream release/2.6.x
362
+
```
363
+
364
+
**Note:** this assume you have add the `bilby-dev/bilby` repository as `upstream`
365
+
366
+
#### Bug-fix releases
367
+
368
+
If making a bugfix release, the relevant commits should be cherry-picked and merged
369
+
into the release branch.
370
+
371
+
**Note:** make sure the changelog is up-to-date.
372
+
373
+
### Tagging the release (optional)
374
+
375
+
**Note:** this step is optional but if followed, allows one to verify the correct commit has been tagged before making the release.
376
+
377
+
Make sure you have the release branch checked out and up-to-date, then tag the release
378
+
379
+
```bash
380
+
git tag v2.6.0
381
+
```
382
+
383
+
Once it is tagged, it should be pushed to the `bilby-dev/bilby` repository.
384
+
385
+
```bash
386
+
git push upstream v2.6.0
387
+
```
388
+
340
389
### Making the release on GitHub
341
390
342
391
**Note:** releases will automatically be pushed to PyPI and versions on PyPI
@@ -346,9 +395,10 @@ Once the changelog has been updated, follow these steps for making a release:
346
395
347
396
1. Navigate to https://github.com/bilby-dev/bilby/releases.
348
397
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`.
398
+
3. Do **one of these steps**:
399
+
-**If you tagged the release manually**: click `Select Tag` and select the correct tag e.g. `v2.6.0`
400
+
-**If you did not tag the release manually**: click `Select Tag`, type the name of the tag e.g. `v2.6.0` and choose `Create new tag: <tag name> on publish`. Set the `Target` to the release branch, e.g.`release/2.6.x`
401
+
4. Specify the version as the title, e.g. `v2.6.0`.
352
402
5. Copy the relevant section from the changelog and include a link to the full changelog, e.g.
0 commit comments