Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RELEASE.md #294

Merged
merged 5 commits into from
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# How to make a release

`oauthenticator` is a package [available on
PyPI](https://pypi.org/project/oauthenticator/) and
[conda-forge](https://conda-forge.org/). These are instructions on how to make a
release on PyPI.

For you to follow along according to these instructions, you need:
- To be a maintainer of the [PyPI oauthenticator
project](https://pypi.org/project/oauthenticator/).
- To have push rights to the [oauthenticator GitHub
repository](https://github.com/jupyterhub/oauthenticator).

## Steps to make a release

1. Checkout master 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 master
git fetch $ORIGIN master
git reset --hard $ORIGIN/master
# WARNING! This next command deletes any untracked files in the repo
git clean -xfd
```

1. Update [CHANGELOG.md](CHANGELOG.md). Doing this can be made easier with the
help of the
[choldgraf/github-activity](https://github.com/choldgraf/github-activity)
utility.

1. Set the `version_info` variable in [_version.py](oauthenticator/_version.py)
appropriately and make a commit with message `release <tag>`.

1. Create a git tag for the commit.

```shell
git tag -a $TAG -m $TAG
```

1. Package the release
```shell
python3 setup.py sdist bdist_wheel
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
```

1. Upload it to PyPI
```shell
twine upload dist/*
```

1. Reset the `version_info` variable in
[_version.py](oauthenticator/_version.py) appropriately with a `dev` element
and make a commit with the message `back to dev`.

1. Push your two commits to master along with the annotated tags referencing
commits on master.

```shell
git push --follow-tags $ORIGIN master
```
consideRatio marked this conversation as resolved.
Show resolved Hide resolved

1. Following the release to PyPI, an automated PR should arrive to
[conda-forge/oauthenticator-feedstock](https://github.com/conda-forge/oauthenticator-feedstock),
check for the tests to succeed on this PR and then merge it to successfully
update the package for `conda` on the conda-forge channel.
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ pytest >= 2.8
pytest-cov
pytest-asyncio
requests-mock
wheel