Skip to content

Commit

Permalink
Update RELEASE.md like, relocate tbump conf
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed May 21, 2023
1 parent 1ad5b5c commit f3b784f
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 47 deletions.
45 changes: 28 additions & 17 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,53 @@
# How to make a release

`jupyterhub-nativeauthenticator` is a package [available on
PyPI](https://pypi.org/project/jupyterhub-nativeauthenticator/). These are
instructions on how to make a release on PyPI. The PyPI release is done
automatically by CI when a tag is pushed.
`jupyterhub-tmpauthenticator` is a package available on [PyPI].

For you to follow along according to these instructions, you need:
These are the instructions on how to make a release.

- To have push rights to the [jupyterhub GitHub repository](https://github.com/jupyterhub/nativeauthenticator).
- To have [`tbump`](https://pypi.org/project/tbump) installed.
## Pre-requisites

- Push rights to this GitHub repository

## Steps to make a release

1. Make sure `CHANGELOG.md` is up-to-date using [github-activity][] ahead of
time in a dedicated PR.
1. Create a PR updating `CHANGELOG.md` with [github-activity] and continue when
its merged.

Advice on this procedure can be found in [this team compass
issue](https://github.com/jupyterhub/team-compass/issues/563).

1. Checkout main and make sure it is up to date.
2. Checkout main and make sure it is up to date.

```shell
ORIGIN=${ORIGIN:-origin} # set to the canonical remote, e.g. 'upstream' if 'origin' is not the official repo
git checkout main
git fetch $ORIGIN main
git reset --hard $ORIGIN/main
git fetch origin main
git reset --hard origin/main
```

3. Update the version, make commits, and push a git tag with `tbump`.

```shell
pip install tbump
```

1. Update the version with `tbump`. You can see what will happen without making
any changes with `tbump --dry-run ${VERSION}`.
`tbump` will ask for confirmation before doing anything.

```shell
# Example versions to set: 1.0.0, 1.0.0b1
VERSION=
tbump ${VERSION}
```

This will tag and publish a release, which will be finished on CI.
Following this, the [CI system] will build and publish a release.

1. Reset the version back to dev, e.g. `2.1.0.dev` after releasing `2.0.0`
4. Reset the version back to dev, e.g. `1.0.1.dev` after releasing `1.0.0`.

```shell
# Example version to set: 1.0.1.dev
NEXT_VERSION=
tbump --no-tag ${NEXT_VERSION}.dev
```

[github-activity]: https://github.com/executablebooks/github-activity
[pypi]: https://pypi.org/project/jupyterhub-nativeauthenticator/
[ci system]: https://github.com/jupyterhub/jupyterhub-nativeauthenticator/actions/workflows/release.yaml
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,32 @@ target_version = [
#
[tool.isort]
profile = "black"


# tbump is used to simplify and standardize the release process when updating
# the version, making a git commit and tag, and pushing changes.
#
# ref: https://github.com/your-tools/tbump#readme
#
[tool.tbump]
github_url = "https://github.com/jupyterhub/nativeauthenticator"

[tool.tbump.version]
current = "1.2.0.dev"
regex = '''
(?P<major>\d+)
\.
(?P<minor>\d+)
\.
(?P<patch>\d+)
(?P<pre>((a|b|rc)\d+)|)
\.?
(?P<dev>(?<=\.)dev\d*|)
'''

[tool.tbump.git]
message_template = "Bump to {new_version}"
tag_template = "{new_version}"

[[tool.tbump.file]]
src = "setup.py"
30 changes: 0 additions & 30 deletions tbump.toml

This file was deleted.

0 comments on commit f3b784f

Please sign in to comment.