|
| 1 | +# Releasing Buildozer |
| 2 | + |
| 3 | +How to cut a new buildozer release. Maintainer-facing. |
| 4 | + |
| 5 | +## Version source of truth |
| 6 | + |
| 7 | +`__version__` in [`buildozer/__init__.py`](buildozer/__init__.py) is the |
| 8 | +single source of truth. `setup.py` reads it via a regex |
| 9 | +(`find_version()`); GitHub Actions reads it from the pushed |
| 10 | +tag. There is no `MANIFEST.in`, no PEP 621 metadata in `pyproject.toml`, |
| 11 | +and no version-bump tooling, edit the string directly. |
| 12 | + |
| 13 | +The post-release convention is to bump to a `.devN` suffix on `master` |
| 14 | +(e.g. after releasing `1.5.0`, master moved to `1.5.1.dev0` in commit |
| 15 | +`0689513`). |
| 16 | + |
| 17 | +## Pre-release checklist |
| 18 | + |
| 19 | +On `master`, before tagging: |
| 20 | + |
| 21 | +1. **Verify CI is green.** Latest run of every workflow on `master`: |
| 22 | + |
| 23 | + ```bash |
| 24 | + gh run list --branch master --limit 8 |
| 25 | + ``` |
| 26 | + |
| 27 | + `Tests` (the Python 3.8–3.14 matrix), `iOS`, `Android Integration`, |
| 28 | + `Docker`, and `PyPI release` (build + `twine check`, no upload on |
| 29 | + non-tag pushes) should all show `success`. |
| 30 | + |
| 31 | +2. **Update `__version__`** in `buildozer/__init__.py` to the target |
| 32 | + version (e.g. `1.5.1`), drop the `.devN` suffix. |
| 33 | + |
| 34 | +3. **Regenerate `CHANGELOG.md`** with |
| 35 | + [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator): |
| 36 | + |
| 37 | + ```bash |
| 38 | + github_changelog_generator --user kivy --project buildozer --future-release 1.5.1 |
| 39 | + ``` |
| 40 | + |
| 41 | + Review the diff, prune noise as needed, and commit. |
| 42 | + |
| 43 | +4. **Refresh Trove classifiers** in `setup.py` (`classifiers=[...]`) so |
| 44 | + the `Programming Language :: Python :: 3.x` entries match the CI |
| 45 | + matrix in `.github/workflows/test_python.yml`. |
| 46 | + |
| 47 | +5. Land steps 2–4 as a PR titled e.g. `Release 1.5.1`. |
| 48 | + |
| 49 | +## Cutting the release |
| 50 | + |
| 51 | +After the release PR is merged: |
| 52 | + |
| 53 | +```bash |
| 54 | +git fetch origin |
| 55 | +git checkout master |
| 56 | +git pull --ff-only |
| 57 | +git tag 1.5.1 |
| 58 | +git push origin 1.5.1 |
| 59 | +``` |
| 60 | + |
| 61 | +The tag push triggers `.github/workflows/pypi-release.yml`, which: |
| 62 | + |
| 63 | +- runs `python -m build` (sdist + wheel), |
| 64 | +- runs `twine check dist/*`, |
| 65 | +- uploads to PyPI via `pypa/gh-action-pypi-publish` using the |
| 66 | + `pypi_password` repository secret. The publish step is gated on |
| 67 | + `startsWith(github.event.ref, 'refs/tags')`. |
| 68 | + |
| 69 | +The same push also re-runs `.github/workflows/docker.yml`, which |
| 70 | +publishes `kivy/buildozer:latest` to DockerHub and |
| 71 | +`ghcr.io/kivy/buildozer:latest` to GHCR (the publish gate is |
| 72 | +`refs/heads/master OR refs/tags/*`). |
| 73 | + |
| 74 | +Tag naming convention: bare `1.5.1` (no `v` prefix), matching every |
| 75 | +release tag from `1.0` onward. |
| 76 | + |
| 77 | +## Post-release |
| 78 | + |
| 79 | +1. **Verify the PyPI page**: |
| 80 | + <https://pypi.org/project/buildozer/> should show the new version. |
| 81 | + Confirm with `pip install buildozer==1.5.1` in a clean venv. |
| 82 | + |
| 83 | +2. **Create a GitHub Release** via the web UI: |
| 84 | + <https://github.com/kivy/buildozer/releases/new>. Select the pushed |
| 85 | + tag, click **Generate release notes** to auto-fill the title and body |
| 86 | + from merged PRs, then **Publish release**. |
| 87 | + |
| 88 | +3. **Announce the release** in the Kivy Discord `#announcements` |
| 89 | + channel: |
| 90 | + <https://discord.com/channels/423249981340778496/490505571271704577>. |
| 91 | + |
| 92 | +4. **Bump master back to dev**: open a follow-up PR setting |
| 93 | + `__version__ = '1.5.2.dev0'` (or `1.6.0.dev0` if the next release |
| 94 | + will be a minor bump). |
| 95 | + |
| 96 | +## Secrets used by the release pipeline |
| 97 | + |
| 98 | +| Secret | Used by | Purpose | |
| 99 | +|---|---|---| |
| 100 | +| `pypi_password` | `pypi-release.yml` | PyPI API token for the upload step | |
| 101 | +| `DOCKERHUB_USERNAME`, `DOCKERHUB_TOKEN` | `docker.yml` | DockerHub login + image push, README sync | |
| 102 | +| `GITHUB_TOKEN` | `docker.yml` | GHCR push (provided implicitly by Actions) | |
| 103 | + |
| 104 | +## Not currently automated |
| 105 | + |
| 106 | +- **Versioned Docker tags**: `docker.yml` only publishes `:latest`. No |
| 107 | + `kivy/buildozer:1.5.1` image is produced. |
| 108 | +- **CHANGELOG generation**: semi-automated via |
| 109 | + `github-changelog-generator` (run locally, commit the result). |
| 110 | +- **GitHub Release object**: manual (step 2 above). |
| 111 | +- **Discord announcement**: manual (step 3 above). |
| 112 | +- **Post-release dev bump**: manual (step 4 above). |
0 commit comments