Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release instructions #57

Merged
merged 11 commits into from
Feb 28, 2024
39 changes: 38 additions & 1 deletion doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,41 @@ PyRIT test files can be run using `pytest`.

## Releasing PyRIT to PyPI
nina-msft marked this conversation as resolved.
Show resolved Hide resolved

romanlutz marked this conversation as resolved.
Show resolved Hide resolved
TODO
Create an account on pypi.org if you don't have one yet.
Ask one of the other maintainers to add you to the `pyrit` project on PyPI.
nina-msft marked this conversation as resolved.
Show resolved Hide resolved

Make sure the version data in pyproject.toml is set correctly.
nina-msft marked this conversation as resolved.
Show resolved Hide resolved
We use standard versioning for Python.
Below, we use x.y.z as the example version.

Before running the following command replace all "local" links like
nina-msft marked this conversation as resolved.
Show resolved Hide resolved
romanlutz marked this conversation as resolved.
Show resolved Hide resolved
"./doc/README.md" with links that will work from any website, i.e.,
"https://github.com/Azure/PyRIT/blob/releases/vx.y.z/doc/README.md"

romanlutz marked this conversation as resolved.
Show resolved Hide resolved
Commit your changes and push them to the repository on a branch called
`releases/vx.y.z`, then run
nina-msft marked this conversation as resolved.
Show resolved Hide resolved

```bash
git tag -a vx.y.z -m "vx.y.z release"
git push --tags
```

To build the package wheel and archive for PyPI run

```bash
python -m build
```

This should print

> Successfully built pyrit-x.y.z.tar.gz and pyrit-x.y.z-py3-none-any.whl

```bash
pip install twine
twine upload dist/*
```

If successful, it will print

> View at:
https://pypi.org/project/pyrit/x.y.z/
Loading