Skip to content

Add RELEASE.md #54

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

Merged
merged 1 commit into from
Jun 12, 2020
Merged
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
55 changes: 55 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Making a new release of nbresuse

## Getting a clean environment

Creating a new environment can help avoid pushing local changes and any extra tag.

```bash
conda create -n nbresuse-release -c conda-forge twine keyring
conda activate nbresuse-release
```

Alternatively, the local repository can be cleaned with:

```bash
git clean -fdx
```

## Releasing on PyPI

Make sure the `dist/` folder is empty.

1. Update the version in `setup.py`
2. `python setup.py sdist bdist_wheel`
3. Double check the size of the bundles in the `dist/` folder
4. Run the tests
- `pip install "dist/nbresuse-X.Y.Z-py3-none-any.whl[dev]"`
- `python -m pytest`
5. `export TWINE_USERNAME=mypypi_username`
6. `twine upload dist/*`

## Releasing on conda-forge

The easiest is to wait for the bot to open the PR automatically.

To do the release manually:

1. Open a new PR on https://github.com/conda-forge/nbresuse-feedstock to update the `version` and the `sha256` hash
2. Wait for the tests
3. Merge the PR

The new version will be available on `conda-forge` soon after.

## Committing and tagging

Commit the changes, create a new release tag, and update the `stable` branch (for Binder), where `x.y.z` denotes the new version:

```bash
git checkout master
git add setup.py
git commit -m "Release x.y.z"
git tag x.y.z
git checkout stable
git reset --hard master
git push origin master stable x.y.z
```