| 1 | ## Instructions to release a new QtAwesome version |
| 2 | |
| 3 | To release a new version of QtAwesome (on PyPI and Conda-forge) follow these steps |
| 4 | |
| 5 | ### Prerequisites |
| 6 | |
| 7 | In order to do a release, you need to have: |
| 8 | |
| 9 | * An environment with the packages required to do the release (`loghub`, `pip`, `setuptools`, `twine`, `wheel`). If using `conda`, you can create a `release` environment with |
| 10 | |
| 11 | conda create -n release python=3.9 |
| 12 | conda activate release |
| 13 | pip install -U pip setuptools twine wheel loghub |
| 14 | |
| 15 | * A clone of this repository (usually your fork with an `upstream` remote pointing to the project original repo) |
| 16 | |
| 17 | * The corresponding credentials (PyPI, GitHub, etc). |
| 18 | |
| 19 | ### PyPI |
| 20 | |
| 21 | * Update local repo with |
| 22 | |
| 23 | git fetch upstream && git checkout master && git merge upstream/master |
| 24 | |
| 25 | * Close the current [milestone on GitHub](https://github.com/spyder-ide/qtawesome/milestones) |
| 26 | |
| 27 | * Clean your local repo with (selecting option 1) |
| 28 | |
| 29 | git clean -xfdi |
| 30 | |
| 31 | * Update `CHANGELOG.md` with |
| 32 | |
| 33 | loghub spyder-ide/qtawesome -m vX.Y.Z |
| 34 | |
| 35 | * Update `_version.py` (set release version, remove 'dev0'): |
| 36 | |
| 37 | git add . && git commit -m "Release X.Y.Z" |
| 38 | |
| 39 | * Update the most important release packages with |
| 40 | |
| 41 | pip install -U pip setuptools twine wheel loghub |
| 42 | |
| 43 | * Create source distribution with |
| 44 | |
| 45 | python setup.py sdist |
| 46 | |
| 47 | * Create wheel with |
| 48 | |
| 49 | python setup.py bdist_wheel |
| 50 | |
| 51 | * Check generated files with |
| 52 | |
| 53 | twine check dist/* |
| 54 | |
| 55 | * Upload generated files with |
| 56 | |
| 57 | twine upload dist/* |
| 58 | |
| 59 | * Create release tag with |
| 60 | |
| 61 | git tag -a vX.Y.Z -m "Release X.Y.Z" |
| 62 | |
| 63 | * Update `_version.py` (add 'dev0' and increment minor) |
| 64 | |
| 65 | * Create `Back to work` commit with |
| 66 | |
| 67 | git add . && git commit -m "Back to work" |
| 68 | |
| 69 | * Push changes and tag with |
| 70 | |
| 71 | git push upstream master && git push upstream --tags |
| 72 | |
| 73 | * Create a [GitHub Release](https://github.com/spyder-ide/qtawesome/releases) (`Draft a new release` and `Publish release`). You can use the `Auto generate release notes` as a base template for the release description and to that add a link to the Changelog (the new release related info). |
| 74 | |
| 75 | ### Conda-forge |
| 76 | |
| 77 | * After doing the release on PyPI check for the `regro-cf-autotick-bot` automatic PR on the [QtAwesome feedstock repo](https://github.com/conda-forge/qtawesome-feedstock/pulls). Review it, check if any dependency or changes are needed and merge it. |