|
1 | 1 | # How to make a release
|
2 | 2 |
|
3 |
| -`jupyterhub-idle-culler` is a package [available on |
4 |
| -PyPI](https://pypi.org/project/jupyterhub-idle-culler/). These are instructions |
5 |
| -on how to make a release on PyPI. The PyPI release is done automatically by a |
6 |
| -GitHub workflow when a tag is pushed. |
| 3 | +`jupyterhub-idle-culler` is a package available on [PyPI] and [conda-forge]. |
| 4 | +These are instructions on how to make a release. |
7 | 5 |
|
8 |
| -For you to follow along according to these instructions, you need: |
| 6 | +## Pre-requisites |
9 | 7 |
|
10 |
| -- To have push rights to the [jupyterhub-idle-culler GitHub |
11 |
| - repository](https://github.com/jupyterhub/jupyterhub-idle-culler). |
| 8 | +- Push rights to [jupyterhub/jupyterhub-idle-culler] |
12 | 9 |
|
13 | 10 | ## Steps to make a release
|
14 | 11 |
|
15 |
| -1. Checkout main and make sure it is up to date. |
| 12 | +1. Create a PR updating `CHANGELOG.md` with [github-activity] and continue only |
| 13 | + when its merged. |
16 | 14 |
|
17 | 15 | ```shell
|
18 |
| - ORIGIN=${ORIGIN:-origin} # set to the canonical remote, e.g. 'upstream' if 'origin' is not the official repo |
19 |
| - git checkout main |
20 |
| - git fetch $ORIGIN main |
21 |
| - git reset --hard $ORIGIN/main |
22 |
| - # WARNING! This next command deletes any untracked files in the repo |
23 |
| - git clean -xfd |
24 |
| - ``` |
25 |
| - |
26 |
| -1. Update [CHANGELOG.md](CHANGELOG.md). Doing this can be made easier with the |
27 |
| - help of the |
28 |
| - [choldgraf/github-activity](https://github.com/choldgraf/github-activity) |
29 |
| - utility. |
| 16 | + pip install github-activity |
30 | 17 |
|
31 |
| -1. Set the `version` variable in [setup.py](setup.py) appropriately and make a |
32 |
| - commit. |
33 |
| - |
34 |
| - ``` |
35 |
| - git add setup.py |
36 |
| - VERSION=... # e.g. 1.2.3 |
37 |
| - git commit -m "release $VERSION" |
| 18 | + github-activity --heading-level=3 jupyterhub/jupyterhub-idle-culler |
38 | 19 | ```
|
39 | 20 |
|
40 |
| -1. Reset the `version` variable in [setup.py](setup.py) appropriately with an |
41 |
| - incremented patch version and a `dev` element, then make a commit. |
| 21 | +1. Checkout main and make sure it is up to date. |
42 | 22 |
|
43 |
| - ``` |
44 |
| - git add setup.py |
45 |
| - git commit -m "back to dev" |
| 23 | + ```shell |
| 24 | + git checkout main |
| 25 | + git fetch origin main |
| 26 | + git reset --hard origin/main |
46 | 27 | ```
|
47 | 28 |
|
48 |
| -1. Push your two commits to main. |
| 29 | +1. Update the version, make commits, and push a git tag with `tbump`. |
49 | 30 |
|
50 | 31 | ```shell
|
51 |
| - # first push commits without a tags to ensure the |
52 |
| - # commits comes through, because a tag can otherwise |
53 |
| - # be pushed all alone without company of rejected |
54 |
| - # commits, and we want have our tagged release coupled |
55 |
| - # with a specific commit in main |
56 |
| - git push $ORIGIN main |
| 32 | + pip install tbump |
| 33 | + tbump --dry-run ${VERSION} |
| 34 | + |
| 35 | + tbump ${VERSION} |
57 | 36 | ```
|
58 | 37 |
|
59 |
| -1. Create a git tag for the pushed release commit and push it. |
| 38 | + Following this, the [CI system] will build and publish a release. |
60 | 39 |
|
61 |
| - ```shell |
62 |
| - git tag -a $VERSION -m $VERSION HEAD~1 |
| 40 | +1. Reset the version back to dev, e.g. `2.1.0.dev` after releasing `2.0.0` |
63 | 41 |
|
64 |
| - # then verify you tagged the right commit |
65 |
| - git log |
66 |
| - |
67 |
| - # then push it |
68 |
| - git push $ORIGIN refs/tags/$VERSION |
| 42 | + ```shell |
| 43 | + tbump --no-tag ${NEXT_VERSION}.dev |
69 | 44 | ```
|
| 45 | + |
| 46 | +1. Following the release to PyPI, an automated PR should arrive within 24 hours |
| 47 | + to [conda-forge/jupyterhub-idle-culler-feedstock] with instructions on |
| 48 | + releasing to conda-forge. You are welcome to volunteer doing this, but aren't |
| 49 | + required as part of making this release to PyPI. |
| 50 | + |
| 51 | +[pypi]: https://pypi.org/project/jupyterhub-idle-culler/ |
| 52 | +[conda-forge]: https://anaconda.org/conda-forge/jupyterhub-idle-culler |
| 53 | +[jupyterhub/jupyterhub-idle-culler]: https://github.com/jupyterhub/jupyterhub-idle-culler |
| 54 | +[conda-forge/jupyterhub-idle-culler-feedstock]: https://github.com/conda-forge/jupyterhub-idle-culler-feedstock |
| 55 | +[github-activity]: https://github.com/executablebooks/github-activity |
| 56 | +[ci system]: https://github.com/jupyterhub/jupyterhub-idle-culler/actions/workflows/release.yaml |
0 commit comments