■ ■ ■ ■ ■ ■
docs/source/development.rst
| 1 | + | .. _development: |
| 2 | + | |
| 3 | + | Development |
| 4 | + | ============== |
| 5 | + | |
| 6 | + | How to publish new version of Maigret |
| 7 | + | ------------------------------------- |
| 8 | + | |
| 9 | + | **Collaborats rights are requires, write Soxoj to get them**. |
| 10 | + | |
| 11 | + | For new version publishing you must create a new branch in repository |
| 12 | + | with a bumped version number and actual changelog first. After it you |
| 13 | + | must create a release, and GitHub action automatically create a new |
| 14 | + | PyPi package. |
| 15 | + | |
| 16 | + | - New branch example: https://github.com/soxoj/maigret/commit/e520418f6a25d7edacde2d73b41a8ae7c80ddf39 |
| 17 | + | - Release example: https://github.com/soxoj/maigret/releases/tag/v0.4.1 |
| 18 | + | |
| 19 | + | 1. Make a new branch locally with a new version name. Check the current version number here: https://pypi.org/project/maigret/. |
| 20 | + | **Increase only patch version (third number)** if there are no breaking changes. |
| 21 | + | |
| 22 | + | .. code-block:: console |
| 23 | + | |
| 24 | + | git checkout -b 0.4.0 |
| 25 | + | |
| 26 | + | 2. Update Maigret version in three files manually: |
| 27 | + | |
| 28 | + | - setup.py |
| 29 | + | - maigret/__version__.py |
| 30 | + | - docs/source/conf.py |
| 31 | + | |
| 32 | + | 3. Create a new empty text section in the beginning of the file `CHANGELOG.md` with a current date: |
| 33 | + | |
| 34 | + | .. code-block:: console |
| 35 | + | |
| 36 | + | ## [0.4.0] - 2022-01-03 |
| 37 | + | |
| 38 | + | 4. Get auto-generate release notes: |
| 39 | + | |
| 40 | + | - Open https://github.com/soxoj/maigret/releases/new |
| 41 | + | - Click `Choose a tag`, enter `test` |
| 42 | + | - Click `Create new tag` |
| 43 | + | - Press `+ Auto-generate release notes` |
| 44 | + | - Copy all the text from description text field below |
| 45 | + | - Paste it to empty text section in `CHANGELOG.txt` |
| 46 | + | - Remove redundant lines `## What's Changed` and `## New Contributors` section if it exists |
| 47 | + | - *Close the new release page* |
| 48 | + | |
| 49 | + | 5. Commit all the changes, push, make pull request |
| 50 | + | |
| 51 | + | .. code-block:: console |
| 52 | + | |
| 53 | + | git add ... |
| 54 | + | git commit -m 'Bump to 0.4.0' |
| 55 | + | git push origin head |
| 56 | + | |
| 57 | + | |
| 58 | + | 6. Merge pull request |
| 59 | + | |
| 60 | + | 7. Create new release |
| 61 | + | |
| 62 | + | - Open https://github.com/soxoj/maigret/releases/new again |
| 63 | + | - Click `Choose a tag` |
| 64 | + | - Enter actual version in format `v0.4.0` |
| 65 | + | - Also enter actual version in the field `Release title` |
| 66 | + | - Click `Create new tag` |
| 67 | + | - Press `+ Auto-generate release notes` |
| 68 | + | - **Press "Publish release" button** |
| 69 | + | |
| 70 | + | 8. That's all, now you can simply wait push to PyPi. You can monitor it in Action page: https://github.com/soxoj/maigret/actions/workflows/python-publish.yml |