From eb0ec3d5b61978297cf7daab2cf55d483efa29a4 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Thu, 12 Sep 2024 18:08:32 +0100 Subject: [PATCH] Add release steps --- README.md | 19 +++++++++++++------ RELEASING.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 RELEASING.md diff --git a/README.md b/README.md index 73fc551..3f89d25 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,16 @@ A bot to help facilitate the [Matrix Spec Proposal Process](https://matrix.org/docs/spec/proposals). -However it is written in a generic way such that it can be used for any project wanting to +However, it is written in a generic way such that it can be used for any project wanting to make use of a similar process. +The official instance of this bot is running under the GitHub user @mscbot. A user guide is available +here: [User Guide](docs/user_guide.md). + +The infrastructure for the official instance is +hosted [on the Matrix.org Foundation's ArgoCD](https://argocd.vpn.infra.matrix.org/applications/argocd/mscbot) +(non-public link). + ## Installation ### Getting the code @@ -115,10 +122,6 @@ Put your config file somewhere and then mount it via a volume. docker run -v /path/to/config/dir:/config matrixdotorg/mscbot-python python -m mscbot -c /config/config.yaml ``` -## User guide - -See [docs/user_guide.md](docs/user_guide.md). - ## Development Several python dependencies are necessary to support development scripts. They can be installed by running: @@ -137,4 +140,8 @@ Before submitting a PR, make sure to lint your code: ``` ./scripts-dev/lint.sh -``` \ No newline at end of file +``` + +### Creating a new release + +See [RELEASING.md](RELEASING.md). \ No newline at end of file diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..de24d5a --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,45 @@ +# Releasing `mscbot-python` + +To make a new release of `mscbot-python`, perform the following. + +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`. + + ``` + export RELEASE_VERSION=X.Y.Z + ``` + + **Note:** Do not include a `v` before the version number. + +1. Update `setup.py` with the new version number: + + ``` + sed -i "s/version=\"[0-9]\+\.[0-9]\+\.[0-9]\+\"/version=\"${RELEASE_VERSION}\"/" setup.py + ``` + +1. Stage, commit and push the changes: + + ``` + git add setup.py + git commit -m "$RELEASE_VERSION" + ``` + +1. Create a new git tag: + + ``` + git tag $RELEASE_VERSION -m "$RELEASE_VERSION" + ``` + +1. Push the tag to the repository: + + ``` + git push origin $RELEASE_VERSION + ``` + + **Note:** A docker image will be automatically created and published when + the tag is uploaded. + +1. [Create a new release](https://github.com/matrix-org/mscbot-python/releases/new) + on GitHub. + Select the tag that was just created and click "Generate release notes". + +1. Press "Publish release", and you're done! 🍾 \ No newline at end of file