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
{{ message }}
Repository navigation
Commit 59f2280
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: doc/contributing/10_release_process.md
+42-41Lines changed: 42 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,35 +104,7 @@ git push --tags
104
104
105
105
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).
106
106
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
136
108
137
109
You'll need the build package to build the project. If it’s not already installed, install it `pip install build`.
138
110
@@ -163,7 +135,7 @@ This should print
163
135
164
136
> Successfully built pyrit-x.y.z.tar.gz and pyrit-x.y.z-py3-none-any.whl
165
137
166
-
## 8. Test Built Package
138
+
## 7. Test Built Package
167
139
168
140
This step is crucial to ensure that the new package works out of the box.
169
141
@@ -207,7 +179,7 @@ Note: You may need to build the package again if those changes modify any depend
207
179
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.
208
180
209
181
210
-
## 9. Migrate Production Database Schema
182
+
## 8. Migrate Production Database Schema
211
183
212
184
Apply any pending Alembic migrations to the production database. This is the **only**
213
185
sanctioned path for modifying the production schema — normal startup only validates,
@@ -255,7 +227,7 @@ Still run it as confirmation.
255
227
since `downgrade()` risks data loss.
256
228
257
229
258
-
## 10. Publish to PyPI
230
+
## 9. Publish to PyPI
259
231
260
232
Create an account on pypi.org if you don't have one yet.
261
233
Ask one of the other maintainers to add you to the `pyrit` project on PyPI.
@@ -272,19 +244,48 @@ If successful, it will print
272
244
> View at:
273
245
> https://pypi.org/project/pyrit/x.y.z/
274
246
275
-
## 11. Update main
247
+
## 10. Update main
276
248
277
249
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:
279
251
280
252
- the version increase in `__init__.py` (while keeping suffix `.dev0`).
281
253
- Search for the previous release version in the codebase and replace any occurrences with the new version
282
254
(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).
283
256
284
257
The PR should be made from your fork and should be a different branch than the releases branch you created earlier.
285
258
This should be something like `x.y.z+1.dev0`.
286
259
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
288
289
289
290
Finally, go to the [releases page](https://github.com/microsoft/PyRIT/releases), select "Draft a new release" and the "tag"
290
291
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
366
367
367
368
**5. Follow the regular release process from step 6 onward:**
368
369
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)
374
373
- Publish to PyPI (step 9)
375
374
- Update `main` with the next dev version (step 10) — for a patch release after `x.y.z`,
376
375
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).
378
379
- Create the GitHub release (step 11) — for patch releases the release notes should
379
380
clearly state the reason for the patch (e.g., "Security fix for …" or "Critical bug fix
380
381
for …"). Because a patch release contains only cherry-picked changes, the "What's
0 commit comments