Skip to content

Commit 59f2280

Browse files
authored
DOC: combine steps 6 and 11 in 10_release_process.md (#2272)
1 parent 9c37ff9 commit 59f2280

1 file changed

Lines changed: 42 additions & 41 deletions

File tree

‎doc/contributing/10_release_process.md‎

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -104,35 +104,7 @@ git push --tags
104104

105105
After pushing the branch to remote, check the release branch to make sure it looks as intended (e.g. check the links in the README work properly).
106106

107-
## 6. Update the documentation site versions
108-
109-
Add the new release as a version on the [documentation site](https://microsoft.github.io/PyRIT/).
110-
Edit `.github/docs-versions.yml` on `main`:
111-
112-
- Append the new release under `versions:` with `slug: "x.y.z"`, `name: "x.y.z"`, and `ref: releases/vx.y.z`.
113-
- Update `stable:` and `default:` at the top of the file to point at the new version (so the
114-
root URL `microsoft.github.io/PyRIT/` and the `/stable/` alias redirect to it).
115-
116-
Open a small PR to `main` with just this change. Once merged, the docs workflow rebuilds the
117-
site and the new version appears in the version picker on every page of every version.
118-
119-
For example, releasing `0.14.0` would change:
120-
121-
```yaml
122-
default: "0.13.0"
123-
stable: "0.13.0"
124-
```
125-
126-
to:
127-
128-
```yaml
129-
default: "0.14.0"
130-
stable: "0.14.0"
131-
```
132-
133-
and add an entry under `versions:` for `0.14.0` pointing at `releases/v0.14.0`.
134-
135-
## 7. Build Package
107+
## 6. Build Package
136108

137109
You'll need the build package to build the project. If it’s not already installed, install it `pip install build`.
138110

@@ -163,7 +135,7 @@ This should print
163135

164136
> Successfully built pyrit-x.y.z.tar.gz and pyrit-x.y.z-py3-none-any.whl
165137
166-
## 8. Test Built Package
138+
## 7. Test Built Package
167139

168140
This step is crucial to ensure that the new package works out of the box.
169141

@@ -207,7 +179,7 @@ Note: You may need to build the package again if those changes modify any depend
207179
Lastly, **Verify pyrit-internal is up to date.** Follow the instructions at [aka.ms/internal-release](https://aka.ms/internal-release) to ensure the internal package is current.
208180

209181

210-
## 9. Migrate Production Database Schema
182+
## 8. Migrate Production Database Schema
211183

212184
Apply any pending Alembic migrations to the production database. This is the **only**
213185
sanctioned path for modifying the production schema — normal startup only validates,
@@ -255,7 +227,7 @@ Still run it as confirmation.
255227
since `downgrade()` risks data loss.
256228

257229

258-
## 10. Publish to PyPI
230+
## 9. Publish to PyPI
259231

260232
Create an account on pypi.org if you don't have one yet.
261233
Ask one of the other maintainers to add you to the `pyrit` project on PyPI.
@@ -272,19 +244,48 @@ If successful, it will print
272244
> View at:
273245
> https://pypi.org/project/pyrit/x.y.z/
274246
275-
## 11. Update main
247+
## 10. Update main
276248

277249
After the release is on PyPI, make sure to create a PR for the `main` branch
278-
where the only changes are:
250+
where the changes are:
279251

280252
- the version increase in `__init__.py` (while keeping suffix `.dev0`).
281253
- Search for the previous release version in the codebase and replace any occurrences with the new version
282254
(without `.dev0`). For example, some installation pages refer to the latest release.
255+
- Update the documentation site versions in `.github/docs-versions.yml` (see below).
283256

284257
The PR should be made from your fork and should be a different branch than the releases branch you created earlier.
285258
This should be something like `x.y.z+1.dev0`.
286259

287-
## 12. Create GitHub Release
260+
### Update the documentation site versions
261+
262+
Add the new release as a version on the [documentation site](https://microsoft.github.io/PyRIT/) by
263+
editing `.github/docs-versions.yml`:
264+
265+
- Append the new release under `versions:` with `slug: "x.y.z"`, `name: "x.y.z"`, and `ref: releases/vx.y.z`.
266+
- Update `stable:` and `default:` at the top of the file to point at the new version (so the
267+
root URL `microsoft.github.io/PyRIT/` and the `/stable/` alias redirect to it).
268+
269+
Once merged, the docs workflow rebuilds the site and the new version appears in the version picker on
270+
every page of every version.
271+
272+
For example, releasing `0.14.0` would change:
273+
274+
```yaml
275+
default: "0.13.0"
276+
stable: "0.13.0"
277+
```
278+
279+
to:
280+
281+
```yaml
282+
default: "0.14.0"
283+
stable: "0.14.0"
284+
```
285+
286+
and add an entry under `versions:` for `0.14.0` pointing at `releases/v0.14.0`.
287+
288+
## 11. Create GitHub Release
288289

289290
Finally, go to the [releases page](https://github.com/microsoft/PyRIT/releases), select "Draft a new release" and the "tag"
290291
for which you want to create the release notes. It should match the version that you just released
@@ -366,15 +367,15 @@ git push origin vx.y.z
366367

367368
**5. Follow the regular release process from step 6 onward:**
368369

369-
- Update the docs site versions (step 6) — add the new patch version to
370-
`.github/docs-versions.yml` and bump `stable:`/`default:` if appropriate.
371-
- Build the package (step 7)
372-
- Test the built package in a clean environment (step 8)
373-
- Run integration tests (step 8)
370+
- Build the package (step 6)
371+
- Test the built package in a clean environment (step 7)
372+
- Run integration tests (step 7)
374373
- Publish to PyPI (step 9)
375374
- Update `main` with the next dev version (step 10) — for a patch release after `x.y.z`,
376375
the next version on `main` may be either `x.y.(z+1).dev0` or `x.(y+1).0.dev0`
377-
depending on what the next planned release is.
376+
depending on what the next planned release is. This is also where you update the docs
377+
site versions in `.github/docs-versions.yml` (add the new patch version and bump
378+
`stable:`/`default:` if appropriate).
378379
- Create the GitHub release (step 11) — for patch releases the release notes should
379380
clearly state the reason for the patch (e.g., "Security fix for …" or "Critical bug fix
380381
for …"). Because a patch release contains only cherry-picked changes, the "What's

0 commit comments

Comments
 (0)