Skip to content

Commit 06c3db4

Browse files
authored
Merge pull request #344 from danyeaw/release-process
Update release process in to steps
2 parents 46af464 + af5c6f2 commit 06c3db4

File tree

1 file changed

+94
-19
lines changed

1 file changed

+94
-19
lines changed

RELEASE.md

Lines changed: 94 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,113 @@
1-
# Making a NbClassic Release
1+
# NbClassic Release Process
2+
3+
## Overview
4+
5+
NbClassic can be released using either the recommended automated method with
6+
`jupyter_releaser` or the manual process described at the end of this document. To use the automated release workflow or create a manual release, you must have admin privileges on the repository.
27

38
## Using `jupyter_releaser`
49

5-
The recommended way to make a release is to use [`jupyter_releaser`](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html).
10+
The recommended way to make a release is to use
11+
[`jupyter_releaser`](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html),
12+
which provides GitHub Actions workflows that automate the release process.
613

7-
### Versioning
14+
## Versioning Flow
815

9-
NbClassic follows the following versioning flow: development → pre-release
10-
(optional) → final release. After each release, the version should
11-
be updated to a development version.
16+
NbClassic follows a standard versioning flow:
17+
1. **Development****Pre-release** (optional) → **Final release**
18+
2. After each release, the version is updated to a new development version.
1219

13-
To begin a release, from the `Actions` page in GitHub, select the pinned `Step 1: Prep Release` workflow then click on `Run workflow`. The `Use workflow from` option indicates the branch where the workflow file is located, while you can specify any target brach to release from in the corresponding input option. You can use the `New Version Specifier` input to specify the release version, and use the `post_version_spec` to define the development version that the target branch should move to after the release (e.g., 1.2.0.dev0 or 1.1.1.dev0 as needed). When setting a
14-
`post_version_spec`, the full version must be specified. For example,
15-
1.1.1.dev0 or 1.1.1rc0 are acceptable. The term `next` as is defaulted to in the `New Version Specifier` option, will result in a patch version update.
20+
## Automated Release Process
1621

17-
Once the `Step 1: Prep release` workflow completes successfully and ouptus are reviewed, you can run `Step 2: Publish Release` specifying the target branch and optionally the URL of the draft PR generated in the previous prep-release step.
22+
To begin a release, follow this two-step process:
1823

19-
### Changelog
24+
### Step 1: Prep Release
2025

21-
The changelog is updated for both pre-releases and final releases.
22-
Final releases aggregate all the pull requests since the previous
23-
final release. As a result, some PRs may appear multiple times,
24-
likely twice, which is consistent with changelog practices in
25-
other Jupyter projects.
26+
1. Go to the **Actions** page in GitHub
27+
2. Select the pinned **Step 1: Prep Release** workflow
28+
3. Click on **Run workflow**
29+
4. Configure the workflow with these parameters:
30+
- **Use workflow from**: Select `Branch: main` (unless you need to use an
31+
updated release workflow from another branch)
32+
- **New Version Specifier**:
33+
- Enter `next` to increment the micro version
34+
- Or enter a specific semantic version (without the leading "v") in the
35+
form of "major.minor.micro" to release a new major or minor version
36+
- **The branch to target**: Enter `main` (unless releasing from a different
37+
branch)
38+
- **Post Version Specifier**:
39+
- Enter the development semantic version that the target branch should
40+
move to after the release
41+
- Format should be "major.minor.micro.devN" (typically the next micro or
42+
minor version with dev0, e.g., 1.8.0.dev0 or 1.8.1.dev0)
43+
- **PR Selection**:
44+
- Select **Use PRs with activity since the last stable git tag**
45+
(recommended)
46+
- Alternatively, leave it unchecked and specify a custom date or git
47+
reference in the **Use PRs with activity since this date or git
48+
reference** field
49+
5. Click **Run workflow** to start the preparation process
2650

27-
## Manual Release
51+
### Step 2: Publish Release
2852

29-
To create a release, run the following:
53+
Once you've reviewed and approved the outputs from Step 1, proceed to publish
54+
the release:
3055

31-
```
56+
1. Navigate to the **Actions** page in GitHub
57+
2. Select the **Step 2: Publish Release** workflow
58+
3. Click on **Run workflow**
59+
4. Configure the workflow parameters:
60+
- **Use workflow from**: Select `Branch: main` (unless using an updated
61+
release workflow from another branch)
62+
- **The target branch**: Enter `main` (unless releasing from a different
63+
branch)
64+
- **The URL of the draft GitHub release**:
65+
- Leave blank to use the latest draft (recommended)
66+
- Alternatively, enter a specific draft URL if you need to use a previous
67+
draft
68+
- **Comma separated list of steps to skip**:
69+
- Leave blank to execute all steps (recommended)
70+
- Specify steps to skip only when necessary for special release scenarios
71+
5. Click **Run workflow** to start the release publication process
72+
73+
### Changelog Management
74+
75+
The changelog is updated automatically for both pre-releases and final releases.
76+
Final releases aggregate all the pull requests since the previous final release.
77+
As a result, some PRs may appear multiple times (typically twice), which is
78+
consistent with changelog practices in other Jupyter projects.
79+
80+
## Manual Release Process
81+
82+
If needed, you can create a release manually by running the following commands:
83+
84+
```bash
85+
# Clean the repository
3286
git clean -dffx
87+
88+
# Build the distribution packages
3389
python -m build
90+
91+
# Update version numbers in the codebase
3492
tbump <new version number>
93+
94+
# Install the twine package for PyPI uploads
3595
pip install twine
96+
97+
# Verify the distribution packages
3698
twine check dist/*
99+
100+
# Upload to PyPI
37101
twine upload dist/*
38102
```
103+
104+
## Best Practices
105+
106+
- Test the pre-releases making the final release when possible
107+
- Always review the generated changelog and release notes before finalizing the
108+
release
109+
- For major or minor version releases, consider adding comprehensive release
110+
notes with notable features and breaking changes
111+
- Announce the release to the [Releases community
112+
channel](https://jupyter.zulipchat.com/#narrow/channel/407388-Releases) and
113+
any other relevant places after completion

0 commit comments

Comments
 (0)