Skip to content

Commit 7fd222a

Browse files
committed
Add RELEASE.md, adopt tbump, rename release workflow for consistency
1 parent e8ef8a7 commit 7fd222a

File tree

3 files changed

+84
-3
lines changed

3 files changed

+84
-3
lines changed

.github/workflows/publish.yml renamed to .github/workflows/release.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ on:
1010
paths-ignore:
1111
- "docs/**"
1212
- ".github/workflows/*.yaml"
13-
- "!.github/workflows/publish.yaml"
13+
- "!.github/workflows/release.yaml"
1414
push:
1515
paths-ignore:
1616
- "docs/**"
1717
- ".github/workflows/*.yaml"
18-
- "!.github/workflows/publish.yaml"
18+
- "!.github/workflows/release.yaml"
1919
branches-ignore:
2020
- "dependabot/**"
2121
- "pre-commit-ci-update-config"
@@ -43,7 +43,7 @@ jobs:
4343
ls -l dist
4444
4545
- name: publish to pypi
46-
uses: pypa/gh-action-pypi-publish@v1.8.6
46+
uses: pypa/gh-action-pypi-publish@release/v1
4747
if: startsWith(github.ref, 'refs/tags/')
4848
with:
4949
user: __token__

RELEASE.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# How to make a release
2+
3+
`jupyter-remote-desktop-proxy` is a package available on [PyPI].
4+
5+
These are the instructions on how to make a release.
6+
7+
## Pre-requisites
8+
9+
- Push rights to this GitHub repository
10+
11+
## Steps to make a release
12+
13+
1. Create a PR updating `CHANGELOG.md` with [github-activity] and continue when
14+
its merged.
15+
16+
Advice on this procedure can be found in [this team compass
17+
issue](https://github.com/jupyterhub/team-compass/issues/563).
18+
19+
2. Checkout main and make sure it is up to date.
20+
21+
```shell
22+
git checkout main
23+
git fetch origin main
24+
git reset --hard origin/main
25+
```
26+
27+
3. Update the version, make commits, and push a git tag with `tbump`.
28+
29+
```shell
30+
pip install tbump
31+
```
32+
33+
`tbump` will ask for confirmation before doing anything.
34+
35+
```shell
36+
# Example versions to set: 1.0.0, 1.0.0b1
37+
VERSION=
38+
tbump ${VERSION}
39+
```
40+
41+
Following this, the [CI system] will build and publish a release.
42+
43+
4. Reset the version back to dev, e.g. `1.0.1.dev` after releasing `1.0.0`.
44+
45+
```shell
46+
# Example version to set: 1.0.1.dev
47+
NEXT_VERSION=
48+
tbump --no-tag ${NEXT_VERSION}.dev
49+
```
50+
51+
[github-activity]: https://github.com/executablebooks/github-activity
52+
[pypi]: https://pypi.org/project/jupyter-remote-desktop-proxy/
53+
[ci system]: https://github.com/jupyterhub/jupyter-remote-desktop-proxy/actions/workflows/release.yaml

pyproject.toml

+28
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,31 @@ target_version = [
3333
"py310",
3434
"py311",
3535
]
36+
37+
# tbump is used to simplify and standardize the release process when updating
38+
# the version, making a git commit and tag, and pushing changes.
39+
#
40+
# ref: https://github.com/your-tools/tbump#readme
41+
#
42+
[tool.tbump]
43+
github_url = "https://github.com/jupyterhub/jupyter-remote-desktop-proxy"
44+
45+
[tool.tbump.version]
46+
current = "1.0.0"
47+
regex = '''
48+
(?P<major>\d+)
49+
\.
50+
(?P<minor>\d+)
51+
\.
52+
(?P<patch>\d+)
53+
(?P<pre>((a|b|rc)\d+)|)
54+
\.?
55+
(?P<dev>(?<=\.)dev\d*|)
56+
'''
57+
58+
[tool.tbump.git]
59+
message_template = "Bump to {new_version}"
60+
tag_template = "v{new_version}"
61+
62+
[[tool.tbump.file]]
63+
src = "setup.py"

0 commit comments

Comments
 (0)