From 31fc656721f0b158c7c03db5edd6540753722296 Mon Sep 17 00:00:00 2001 From: Soxoj <31013580+soxoj@users.noreply.github.com> Date: Wed, 23 Feb 2022 16:46:58 +0300 Subject: [PATCH] Added package publishing instruction (#356) --- README.md | 2 +- docs/source/development.rst | 70 +++++++++++++++++++++++++++++++++++++ docs/source/index.rst | 1 + 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 docs/source/development.rst diff --git a/README.md b/README.md index f5404eb..074fc88 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ maigret user --tags photo,dating maigret user1 user2 user3 -a ``` -Use `maigret --help` to get full options description. Also options are documented in [the Maigret Wiki](https://github.com/soxoj/maigret/wiki/Command-line-options). +Use `maigret --help` to get full options description. Also options [are documented](https://maigret.readthedocs.io/en/latest/command-line-options.html). ## Demo with page parsing and recursive username search diff --git a/docs/source/development.rst b/docs/source/development.rst new file mode 100644 index 0000000..95ae37a --- /dev/null +++ b/docs/source/development.rst @@ -0,0 +1,70 @@ +.. _development: + +Development +============== + +How to publish new version of Maigret +------------------------------------- + +**Collaborats rights are requires, write Soxoj to get them**. + +For new version publishing you must create a new branch in repository +with a bumped version number and actual changelog first. After it you +must create a release, and GitHub action automatically create a new +PyPi package. + +- New branch example: https://github.com/soxoj/maigret/commit/e520418f6a25d7edacde2d73b41a8ae7c80ddf39 +- Release example: https://github.com/soxoj/maigret/releases/tag/v0.4.1 + +1. Make a new branch locally with a new version name. Check the current version number here: https://pypi.org/project/maigret/. +**Increase only patch version (third number)** if there are no breaking changes. + +.. code-block:: console + + git checkout -b 0.4.0 + +2. Update Maigret version in three files manually: + +- setup.py +- maigret/__version__.py +- docs/source/conf.py + +3. Create a new empty text section in the beginning of the file `CHANGELOG.md` with a current date: + +.. code-block:: console + + ## [0.4.0] - 2022-01-03 + +4. Get auto-generate release notes: + +- Open https://github.com/soxoj/maigret/releases/new +- Click `Choose a tag`, enter `test` +- Click `Create new tag` +- Press `+ Auto-generate release notes` +- Copy all the text from description text field below +- Paste it to empty text section in `CHANGELOG.txt` +- Remove redundant lines `## What's Changed` and `## New Contributors` section if it exists +- *Close the new release page* + +5. Commit all the changes, push, make pull request + +.. code-block:: console + + git add ... + git commit -m 'Bump to 0.4.0' + git push origin head + + +6. Merge pull request + +7. Create new release + +- Open https://github.com/soxoj/maigret/releases/new again +- Click `Choose a tag` +- Enter actual version in format `v0.4.0` +- Also enter actual version in the field `Release title` +- Click `Create new tag` +- Press `+ Auto-generate release notes` +- **Press "Publish release" button** + +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 \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 273e4cf..85a5562 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -28,3 +28,4 @@ You may be interested in: tags usage-examples settings + development