Skip to content

Commit 9808b32

Browse files
committed
[DOCS] update contributing guide to include release procedure
part of #176
1 parent bde52c3 commit 9808b32

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

docs/CONTRIBUTING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,62 @@ conda activate {dev_environment_name}
170170
pip install scportrait[dev]
171171
```
172172

173+
## Creating a New Release
174+
175+
Before creating a release, ensure that **all tests pass** for the code currently on `main` (unit tests and end-to-end tests). If any tests fail, fix the issues before proceeding.
176+
177+
Releases are versioned and published through automated GitHub workflows. The release process consists of the following steps:
178+
179+
### 1. Bump the version
180+
181+
The version is incremented using the **Bump version** workflow:
182+
183+
1. Open: <https://github.com/MannLabs/scPortrait/actions/workflows/bump_version.yml>
184+
2. Run the workflow and specify the version increment (`patch`, `minor`, or `major`).
185+
186+
This will create **two pull requests**:
187+
- **`[VERSION] Bump version to X.Y.Z`***merge this now*
188+
- **`[VERSION] Bump version to X.Y.Z-dev0`***merge this after the release*
189+
190+
### 2. Merge the version bump PR
191+
192+
1. Merge the PR titled: `[VERSION] Bump version to X.Y.Z`
193+
194+
This sets the release version in the codebase.
195+
196+
### 3. Create a draft release
197+
198+
1. Open: <https://github.com/MannLabs/scPortrait/actions/workflows/create_release.yml>
199+
2. Run the workflow and specify:
200+
- **Branch:** `main`
201+
202+
This workflow will create a **draft release** automatically.
203+
204+
### 4. Finalize the GitHub release
205+
206+
1. Go to the Releases page: <https://github.com/MannLabs/scPortrait/releases>
207+
2. Select the **draft** release that was generated.
208+
3. Click **"Generate release notes"** to automatically populate the changelog from commit messages.
209+
4. Review and publish the release.
210+
211+
### 5. Publish the release to PyPI
212+
213+
1. Open: <https://github.com/MannLabs/scPortrait/actions/workflows/publish_on_pypi.yml>
214+
2. Run the **Publish on PyPI** workflow.
215+
3. Enter the version number you just released.
216+
4. Wait for the workflow to complete successfully.
217+
218+
This workflow:
219+
- Builds and uploads the package to PyPI
220+
- Runs validation tests against the published package
221+
222+
### 6. Merge the post-release development version bump
223+
224+
Once PyPI publication is confirmed, merge the second PR: `[VERSION] Bump version to X.Y.Z-dev0`
225+
226+
This transitions the project back into a development state.
227+
228+
173229
<!-- Links -->
174230

175231
[Atlassian's git tutorial]: https://www.atlassian.com/git/tutorials

0 commit comments

Comments
 (0)