All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
3 _Black_ has had a lot of work automating its release process. This document sets out to
4 explain what everything does and how to release _Black_ using said automation.
8 To cut a release, you must be a _Black_ maintainer with `GitHub Release` creation
9 access. Using this access, the release process is:
11 1. Cut a new PR editing `CHANGES.md` to version the latest changes
12 1. Example PR: https://github.com/psf/black/pull/2192
13 2. Example title: `Update CHANGES.md for XX.X release`
14 2. Once the release PR is merged ensure all CI passes
15 1. If not, ensure there is an Issue open for the cause of failing CI (generally we'd
16 want this fixed before cutting a release)
17 3. Open `CHANGES.md` and copy the _raw markdown_ of the latest changes to use in the
18 description of the GitHub Release.
19 4. Go and [cut a release](https://github.com/psf/black/releases) using the GitHub UI so
20 that all workflows noted below are triggered.
21 1. The release version and tag should be the [CalVer](https://calver.org) version
22 _Black_ used for the current release e.g. `21.6` / `21.5b1`
23 2. _Black_ uses [setuptools scm](https://pypi.org/project/setuptools-scm/) to pull
24 the current version for the package builds and release.
25 5. Once the release is cut, you're basically done. It's a good practice to go and watch
26 to make sure all the [GitHub Actions](https://github.com/psf/black/actions) pass,
27 although you should receive an email to your registered GitHub email address should
29 1. You should see all the release workflows and lint/unittests workflows running on
30 the new tag in the Actions UI
32 If anything fails, please go read the respective action's log output and configuration
33 file to reverse engineer your way to a fix/soluton.
37 All _Blacks_'s automation workflows use GitHub Actions. All workflows are therefore
38 configured using `.yml` files in the `.github/workflows` directory of the _Black_
41 Below are descriptions of our release workflows.
45 This workflow uses the QEMU powered `buildx` feature of docker to upload a `arm64` and
46 `amd64`/`x86_64` build of the official _Black_ docker image™.
48 - Currently this workflow uses an API Token associated with @cooperlees account
52 This workflow builds a Python
53 [sdist](https://docs.python.org/3/distutils/sourcedist.html) and
54 [wheel](https://pythonwheels.com) using the latest
55 [setuptools](https://pypi.org/project/setuptools/) and
56 [wheel](https://pypi.org/project/wheel/) modules.
58 It will then use [twine](https://pypi.org/project/twine/) to upload both release formats
59 to PyPI for general downloading of the _Black_ Python package. This is where
60 [pip](https://pypi.org/project/pip/) looks by default.
62 - Currently this workflow uses an API token associated with @ambv's PyPI account
64 ### Upload self-contained binaries
66 This workflow builds self-contained binaries for multiple platforms. This allows people
67 to download the executable for their platform and run _Black_ without a
68 [Python Runtime](https://wiki.python.org/moin/PythonImplementations) installed.
70 The created binaries are attached/stored on the associated
71 [GitHub Release](https://github.com/psf/black/releases) for download over _IPv4 only_
72 (GitHub still does not have IPv6 access 😢).