|
| 1 | +.. _dev_releasing: |
| 2 | + |
| 3 | +*********************** |
| 4 | +Releasing a New Version |
| 5 | +*********************** |
| 6 | + |
| 7 | +This document describes the steps for maintainers to tag and release a new |
| 8 | +version of ``MPAS-Analysis``, and to update the conda-forge feedstock. |
| 9 | + |
| 10 | +Version Bump and Dependency Updates |
| 11 | +=================================== |
| 12 | + |
| 13 | +1. **Update the Version Number** |
| 14 | + |
| 15 | + - Open a pull request (PR) to update the version number in the following |
| 16 | + two files: |
| 17 | + |
| 18 | + - ``mpas_analysis/version.py`` |
| 19 | + |
| 20 | + - ``ci/recipe/meta.yaml`` |
| 21 | + |
| 22 | + - Make sure the version follows `semantic versioning <https://semver.org/>`_. |
| 23 | + |
| 24 | +2. **Check and Update Dependencies** |
| 25 | + |
| 26 | + - Ensure that dependencies and their constraints are up-to-date and |
| 27 | + consistent in: |
| 28 | + |
| 29 | + - ``ci/recipe/meta.yaml`` (dependencies for the conda-forge release) |
| 30 | + |
| 31 | + - ``pyproject.toml`` (dependencies for PyPI; used as a sanity check) |
| 32 | + |
| 33 | + - ``dev-spec.txt`` (development dependencies; should be a superset of |
| 34 | + those for the conda-forge release) |
| 35 | + |
| 36 | + - The dependencies in ``meta.yaml`` are the ones that will be used for the |
| 37 | + released package on conda-forge. The dependencies in ``pyproject.toml`` |
| 38 | + are for PyPI and should be kept in sync as much as possible but are only |
| 39 | + there as a sanity check when we run ``pip check``. The ``dev-spec.txt`` |
| 40 | + file should include all dependencies needed for development and testing. |
| 41 | + |
| 42 | + - Review and update dependency versions and constraints as needed. |
| 43 | + |
| 44 | +3. **Make a PR and merge it** |
| 45 | + |
| 46 | +Tagging and Publishing a Release |
| 47 | +================================ |
| 48 | + |
| 49 | +4. **Tag the Release on GitHub** |
| 50 | + |
| 51 | + - Go to https://github.com/MPAS-Dev/MPAS-Analysis/releases and click on |
| 52 | + "Draft a new release". |
| 53 | + |
| 54 | + - Enter the appropriate tag for the release, following semantic versioning |
| 55 | + (e.g., ``1.13.0``; **do not** include a ``v`` in front). |
| 56 | + |
| 57 | + - Enter a release title (typically the release version **with** a ``v`` in |
| 58 | + front, e.g., ``v1.13.0``). |
| 59 | + |
| 60 | + - Write a description and/or use the "Generate release notes" button to |
| 61 | + auto-generate release notes. |
| 62 | + |
| 63 | + - If the release is ready, click "Publish release". Otherwise, save it as a |
| 64 | + draft. |
| 65 | + |
| 66 | +Updating the conda-forge Feedstock |
| 67 | +================================== |
| 68 | + |
| 69 | +5. **Update the conda-forge Feedstock** |
| 70 | + |
| 71 | + - After the release is published, update and merge a PR for the new release |
| 72 | + at the conda-forge feedstock: |
| 73 | + https://github.com/conda-forge/mpas-analysis-feedstock |
| 74 | + |
| 75 | + - The conda-forge bot should automatically create a pull request for the |
| 76 | + new version within a few hours to a day after the release. |
| 77 | + |
| 78 | + - Compare the dependencies in the new release to those in the previous |
| 79 | + release and update the recipe as needed. To do this: |
| 80 | + |
| 81 | + - Find the most recent release at |
| 82 | + https://github.com/MPAS-Dev/MPAS-Analysis/releases |
| 83 | + |
| 84 | + - Use the "Compare" feature to select the previous release. |
| 85 | + |
| 86 | + - Under "changed files", locate ``ci/recipe/meta.yaml`` to see |
| 87 | + any dependency changes. |
| 88 | + |
| 89 | + - Review and update the feedstock PR as needed, then merge it. |
| 90 | + |
| 91 | + - If you are not already a maintainer of the feedstock, you can request to |
| 92 | + be added by creating a new issue at |
| 93 | + https://github.com/conda-forge/mpas-analysis-feedstock/issues, choosing |
| 94 | + "Bot command", and putting |
| 95 | + ``@conda-forge-admin, please add user @username`` as the subject. |
0 commit comments