Skip to content

Commit 9344dc1

Browse files
authored
Merge pull request kivy#3328 from AndreMiras/doc/release-process
📝 Document release process and fix README badges
2 parents 28c8060 + 055e769 commit 9344dc1

3 files changed

Lines changed: 96 additions & 41 deletions

File tree

CONTRIBUTING.md

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -120,44 +120,10 @@ and runs the linting inside the container.
120120
- Trailing whitespace trimming
121121
- Files end with newline
122122

123-
## Creating a new release
124-
125-
(These instructions are for core developers, not casual contributors.)
126-
127-
New releases follow these steps:
128-
129-
- Create a new branch `release-YYYY.MM.DD` based on the `develop` branch.
130-
- `git checkout -b release-YYYY.MM.DD develop`
131-
- Create a Github pull request to merge `release-YYYY.MM.DD` into `master`.
132-
- Complete all steps in the [release checklist](#Release_checklist),
133-
and document this in the pull request (copy the checklist into the PR text)
134-
135-
At this point, wait for reviewer approval and conclude any discussion that
136-
arises. To complete the release:
137-
138-
- Merge the release branch to the `master` branch.
139-
- Also merge the release branch to the `develop` branch.
140-
- Tag the release commit in `master`, with tag `vYYYY.MM.DD`. Include a short
141-
summary of the changes.
142-
- Release distributions and PyPI upload should be
143-
[handled by the CI](.github/workflows/pypi-release.yml).
144-
- Add to the GitHub release page (see e.g. [this example](https://github.com/kivy/python-for-android/releases/tag/v2019.06.06):
145-
- The python-for-android README summary
146-
- A short list of major changes in this release, if any
147-
- A changelog summarising merge commits since the last release
148-
- The release sdist and wheel(s)
149-
150-
## Release checklist
151-
152-
- [ ] Check that the builds are passing
153-
- [ ] [GitHub Action](https://github.com/kivy/python-for-android/actions)
154-
- [ ] Run the tests locally via `tox`: this performs some long-running tests that are skipped on github-actions.
155-
- [ ] Build and run the [on_device_unit_tests](https://github.com/kivy/python-for-android/tree/master/testapps/on_device_unit_tests) app using buildozer. Check that they all pass.
156-
- [ ] Build (or download from github actions) and run the following [testapps](https://github.com/kivy/python-for-android/tree/master/testapps/on_device_unit_tests) for arch `armeabi-v7a` and `arm64-v8a`:
157-
- [ ] on_device_unit_tests
158-
- [ ] `armeabi-v7a` (`cd testapps/on_device_unit_tests && PYTHONPATH=.:../../ python3 setup.py apk --ndk-dir=<your-ndk-dir> --sdk-dir=<your-sdk-dir> --arch=armeabi-v7a --debug`)
159-
- [ ] `arm64-v8a` (`cd testapps/on_device_unit_tests && PYTHONPATH=.:../../ python3 setup.py apk --ndk-dir=<your-ndk-dir> --sdk-dir=<your-sdk-dir> --arch=arm64-v8a --debug`)
160-
- [ ] Check that the version number is correct
123+
## Releasing
124+
125+
The release process for core developers is documented separately in
126+
[RELEASING.md](RELEASING.md).
161127

162128
## How python-for-android uses `pip`
163129

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ python-for-android is not limited to being used with Buildozer.
4242
[![GitHub contributors](https://img.shields.io/github/contributors-anon/kivy/python-for-android)](https://github.com/kivy/python-for-android/graphs/contributors)
4343
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
4444

45-
![PyPI - Version](https://img.shields.io/pypi/v/python-for-android)
46-
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-for-android)
45+
[![PyPI - Version](https://img.shields.io/pypi/v/python-for-android)](https://pypi.org/project/python-for-android/)
46+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-for-android)](https://pypi.org/project/python-for-android/)
4747

48-
[![Unit tests & build apps](https://github.com/kivy/python-for-android/workflows/Unit%20tests%20&%20build%20apps/badge.svg?branch=develop)](https://github.com/kivy/python-for-android/actions?query=workflow%3A%22Unit+tests+%26+build+apps%22)
48+
[![Unit tests & build apps](https://github.com/kivy/python-for-android/actions/workflows/push.yml/badge.svg?branch=develop)](https://github.com/kivy/python-for-android/actions/workflows/push.yml)
4949
[![Coverage Status](https://coveralls.io/repos/github/kivy/python-for-android/badge.svg?branch=develop&kill_cache=1)](https://coveralls.io/github/kivy/python-for-android?branch=develop)
5050
[![Docker](https://github.com/kivy/python-for-android/actions/workflows/docker.yml/badge.svg)](https://github.com/kivy/python-for-android/actions/workflows/docker.yml)
5151

RELEASING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Releasing python-for-android
2+
3+
This document describes the release process for python-for-android. It is
4+
intended for core developers who cut new releases. Casual contributors do
5+
not need to read it.
6+
7+
## Versioning
8+
9+
python-for-android uses [calendar versioning](https://calver.org/) of the
10+
form `YYYY.MM.DD` (e.g. `2026.05.09`). Calendar versioning is used because
11+
changes are often driven by Android build-tool updates, so users generally
12+
want the latest release. Backward compatibility is preserved across
13+
releases where possible.
14+
15+
The single source of truth for the version is
16+
[`pythonforandroid/__init__.py`](pythonforandroid/__init__.py). `setup.py`
17+
parses `__version__` from that file and exposes it as the package version.
18+
19+
## Branching model
20+
21+
- `master` always represents the latest stable release.
22+
- `develop` is the active development branch and the target for all PRs.
23+
- Release branches `release-YYYY.MM.DD` are cut from `develop` for each
24+
release, then merged into both `master` and back into `develop`.
25+
26+
## Release steps
27+
28+
1. **Cut a release branch** from an up-to-date `develop`:
29+
30+
```bash
31+
git checkout develop && git pull
32+
git checkout -b release-YYYY.MM.DD
33+
```
34+
35+
2. **Bump the version** in
36+
[`pythonforandroid/__init__.py`](pythonforandroid/__init__.py).
37+
38+
3. **Regenerate `CHANGELOG.md`** using
39+
[`github-changelog-generator`](https://github.com/github-changelog-generator/github-changelog-generator).
40+
41+
4. **Open a pull request** from `release-YYYY.MM.DD` targeting `master`.
42+
Copy the [release checklist](#release-checklist) into the PR
43+
description and tick items off as they are validated.
44+
45+
5. **Wait for review and complete the checklist** before merging.
46+
47+
6. **Merge the release branch into `master`**, then merge it back into
48+
`develop` so the version bump and changelog land on both branches.
49+
50+
7. **Tag the release commit on `master`** with an annotated tag:
51+
52+
```bash
53+
git checkout master && git pull
54+
git tag -a vYYYY.MM.DD -m "Release YYYY.MM.DD"
55+
git push origin vYYYY.MM.DD
56+
```
57+
58+
Tags follow the format `vYYYY.MM.DD`.
59+
60+
8. **PyPI upload happens automatically** when the tag is pushed. The
61+
[`pypi-release.yml`](.github/workflows/pypi-release.yml) workflow
62+
builds `sdist` and `bdist_wheel`, runs `twine check`, and uploads via
63+
the `pypi_password` token. Non-tag pushes still build and check the
64+
artifacts but do not publish.
65+
66+
9. **Create the GitHub Release** at
67+
<https://github.com/kivy/python-for-android/releases> from the new
68+
tag. Use GitHub's "Generate release notes" feature to auto-fill the
69+
title and description from merged PRs since the previous tag, then
70+
tweak as needed.
71+
72+
10. **Announce the release on Discord** in the
73+
[#announcements](https://discord.com/channels/423249981340778496/490505571271704577)
74+
channel. Include the version number and a link to the GitHub
75+
release page.
76+
77+
## Release checklist
78+
79+
Use this as the PR description for the release branch.
80+
81+
- [ ] Check that the builds are passing
82+
- [ ] [GitHub Action](https://github.com/kivy/python-for-android/actions)
83+
- [ ] Run the tests locally via `tox`: this performs some long-running tests that are skipped on github-actions.
84+
- [ ] Build and run the [on_device_unit_tests](https://github.com/kivy/python-for-android/tree/master/testapps/on_device_unit_tests) app using buildozer. Check that they all pass.
85+
- [ ] Build (or download from github actions) and run the following [testapps](https://github.com/kivy/python-for-android/tree/master/testapps/on_device_unit_tests) for arch `armeabi-v7a` and `arm64-v8a`:
86+
- [ ] on_device_unit_tests
87+
- [ ] `armeabi-v7a` (`cd testapps/on_device_unit_tests && PYTHONPATH=.:../../ python3 setup.py apk --ndk-dir=<your-ndk-dir> --sdk-dir=<your-sdk-dir> --arch=armeabi-v7a --debug`)
88+
- [ ] `arm64-v8a` (`cd testapps/on_device_unit_tests && PYTHONPATH=.:../../ python3 setup.py apk --ndk-dir=<your-ndk-dir> --sdk-dir=<your-sdk-dir> --arch=arm64-v8a --debug`)
89+
- [ ] Check that the version number is correct

0 commit comments

Comments
 (0)