|
| 1 | +.. _release_procedure: |
| 2 | + |
| 3 | +Release Procedure |
| 4 | +================= |
| 5 | + |
| 6 | +How to issue a xarray-simlab release in a few steps: |
| 7 | + |
| 8 | +1. Ensure local master branch is synced to upstream:: |
| 9 | + |
| 10 | + $ git pull upstream master |
| 11 | + |
| 12 | +2. Check ``whats_new.rst`` and the docs. Make sure "Release Notes" is |
| 13 | + complete (check the date!) and if needed add a brief summary note |
| 14 | + describing the release at the top. |
| 15 | + |
| 16 | +3. If you have any doubts, run the full test suite one final time!:: |
| 17 | + |
| 18 | + $ pytest xsimlab -vv |
| 19 | + |
| 20 | +5. On the master branch, commit the release in git:: |
| 21 | + |
| 22 | + $ git commit -a -m 'release v0.X.Y' |
| 23 | + |
| 24 | +6. Tag the release:: |
| 25 | + |
| 26 | + $ git tag -a v0.X.Y -m '0.X.Y' |
| 27 | + |
| 28 | +7. Push to GitHub:: |
| 29 | + |
| 30 | + $ git push upstream master --tags |
| 31 | + |
| 32 | +8. Publish the release on GitHub: go to the repository's URL, follow |
| 33 | + the ``releases`` link, click on the ``Draft a new release`` button, |
| 34 | + select the tag of this release, add a title (e.g., the tag name) |
| 35 | + and a description (e.g., the summary added in ``whats_new.rst``). |
| 36 | + |
| 37 | +8. Before build the package and upload to PyPI, make sure that you |
| 38 | + didn't make a local install using pip (maybe due to .egg-info |
| 39 | + conflict, this make cause issue with the packaged version on PyPI, |
| 40 | + which may be unusable and this is irreversible!). For steps 8 and 9 |
| 41 | + below, either you can switch to another local clone of the |
| 42 | + repository (clean and up-to-date!! repeat step 1 if needed), or |
| 43 | + first clean the repository from build/dist files and/or all git |
| 44 | + untracked and ignored files (if you don't mind losing them):: |
| 45 | + |
| 46 | + $ rm -rf dist build */*.egg-info *.egg-info |
| 47 | + $ git clean -xfd |
| 48 | + |
| 49 | +9. Build source and binary wheels for PyPI:: |
| 50 | + |
| 51 | + $ python setup.py bdist_wheel sdist |
| 52 | + |
| 53 | +10. Use twine to register and upload the release on pypi. You will |
| 54 | + need to be listed as a package owner at |
| 55 | + https://pypi.python.org/pypi/xarray-simlab for this to work. Be |
| 56 | + careful, this is irreversible!!:: |
| 57 | + |
| 58 | + $ twine upload dist/xarray-simlab-0.X.Y* |
| 59 | + |
| 60 | +11. Update conda-forge. Clone |
| 61 | + https://github.com/conda-forge/xarray-simlab-feedstock and update |
| 62 | + the version number and sha256 in ``recipe/meta.yaml`` (check also |
| 63 | + dependencies). Submit a pull request (and merge it, once CI |
| 64 | + passes). Note: on macOS, you can calculate sha256 with:: |
| 65 | + |
| 66 | + $ shasum -a 256 xarray-simlab-0.X.Y.tar.gz |
| 67 | + |
| 68 | +12. Add a section for the next release (v.X.(Y+1)) to |
| 69 | + ``doc/whats-new.rst``. |
| 70 | + |
| 71 | +13. Commit your changes and push to master again:: |
| 72 | + |
| 73 | + $ git commit -a -m 'Revert to dev version' |
| 74 | + $ git push upstream master |
0 commit comments