Skip to content

Commit 71b324f

Browse files
committed
Add release steps
1 parent f6343be commit 71b324f

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,8 @@ Before submitting a PR, make sure to lint your code:
137137

138138
```
139139
./scripts-dev/lint.sh
140-
```
140+
```
141+
142+
### Creating a new release
143+
144+
See [RELEASING.md](RELEASING.md).

RELEASING.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Releasing `mscbot-python`
2+
3+
To make a new release of `mscbot-python`, perform the following.
4+
5+
1. Determine the new version number. This project follows [semantic versioning](https://semver.org/). Store the release version in an environment variable called `RELEASE_VERSION`.
6+
7+
```
8+
export RELEASE_VERSION=X.Y.Z
9+
```
10+
11+
**Note:** Do not include a `v` before the version number.
12+
13+
1. Update `setup.py` with the new version number:
14+
15+
```
16+
sed -i "s/version=\"[0-9]\+\.[0-9]\+\.[0-9]\+\"/version=\"${RELEASE_VERSION}\"/" setup.py
17+
```
18+
19+
1. Stage, commit and push the changes:
20+
21+
```
22+
git add setup.py
23+
git commit -m "$RELEASE_VERSION"
24+
```
25+
26+
1. Create a new git tag:
27+
28+
```
29+
git tag $RELEASE_VERSION -m "$RELEASE_VERSION"
30+
```
31+
32+
1. Push the tag to the repository:
33+
34+
```
35+
git push origin $RELEASE_VERSION
36+
```
37+
38+
**Note:** A docker image will be automatically created and published when
39+
the tag is uploaded.
40+
41+
1. [Create a new release](https://github.com/matrix-org/mscbot-python/releases/new)
42+
on GitHub.
43+
Select the tag that was just created and click "Generate release notes".
44+
45+
1. Press "Publish release", and you're done! 🍾

0 commit comments

Comments
 (0)