Skip to content

Commit 85ff0b9

Browse files
authored
Merge pull request #54 from jtpio/release
Add RELEASE.md
2 parents ba1f4e7 + ef74597 commit 85ff0b9

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

RELEASE.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Making a new release of nbresuse
2+
3+
## Getting a clean environment
4+
5+
Creating a new environment can help avoid pushing local changes and any extra tag.
6+
7+
```bash
8+
conda create -n nbresuse-release -c conda-forge twine keyring
9+
conda activate nbresuse-release
10+
```
11+
12+
Alternatively, the local repository can be cleaned with:
13+
14+
```bash
15+
git clean -fdx
16+
```
17+
18+
## Releasing on PyPI
19+
20+
Make sure the `dist/` folder is empty.
21+
22+
1. Update the version in `setup.py`
23+
2. `python setup.py sdist bdist_wheel`
24+
3. Double check the size of the bundles in the `dist/` folder
25+
4. Run the tests
26+
- `pip install "dist/nbresuse-X.Y.Z-py3-none-any.whl[dev]"`
27+
- `python -m pytest`
28+
5. `export TWINE_USERNAME=mypypi_username`
29+
6. `twine upload dist/*`
30+
31+
## Releasing on conda-forge
32+
33+
The easiest is to wait for the bot to open the PR automatically.
34+
35+
To do the release manually:
36+
37+
1. Open a new PR on https://github.com/conda-forge/nbresuse-feedstock to update the `version` and the `sha256` hash
38+
2. Wait for the tests
39+
3. Merge the PR
40+
41+
The new version will be available on `conda-forge` soon after.
42+
43+
## Committing and tagging
44+
45+
Commit the changes, create a new release tag, and update the `stable` branch (for Binder), where `x.y.z` denotes the new version:
46+
47+
```bash
48+
git checkout master
49+
git add setup.py
50+
git commit -m "Release x.y.z"
51+
git tag x.y.z
52+
git checkout stable
53+
git reset --hard master
54+
git push origin master stable x.y.z
55+
```

0 commit comments

Comments
 (0)