From 6b011de34b6b2da29daa5ab1d1d407d467bc3908 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Sat, 24 Jul 2021 09:46:19 +0200 Subject: [PATCH] =?UTF-8?q?[doc]=20#149:=20Add=20dev=20workflow=20=C3=89?= =?UTF-8?q?=C2=A7,=20Update=20release=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2c812317..4dbc29b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,13 @@ # Contribute guide +## Development workflow +Create and push a feature or bugfix release out of the `main` branch. +Name this branch after the ticket number `###`. +Open a merge out of this branch to the `main` branch: +```bash +main <- ###_feature_branch +``` + ## Pre-commit We are using [`pre-commit`](https://pre-commit.com/) tool to perform checks on staged changes before committing. We are using it for `black` formatting, `isort` imports sorting, `pylint` code linting, `mypy` typing, and `gitlab-ci` linting. @@ -56,10 +64,10 @@ Follow [this documentation](https://github.com/Lucas-C/pre-commit-hooks#removing Only difference is to update the year in `license_header.txt` rather than `LICENSE.txt`. ## Release workflow -To handle a release, you have to respect this workflow: +To handle a release, you have to follow this workflow: -* Verify all features and bug fixes are merged in the `dev` branch. -* Checkout on the `dev` branch +* Verify all features and bug fixes are merged in the `main` branch. +* Checkout on the `main` branch * Update the `CHANGELOG.md` file and commit * Run the `release.sh` script with the version semantic number as argument: @@ -67,6 +75,6 @@ To handle a release, you have to respect this workflow: ./release.sh 0.50.0 ``` -* A new commit is added with the version number and a tag in git. -* Merge all new commits from `dev` to `master` on GitLab with a merge request. -* Release on PyPI from the GitLab pipeline manual job of the `master` branch. +* Create a MR containing the changelog and the commit updating the version +* Once the MR is merged to `main`, push the tag with `git push --tags` +* To release to PyPI, the pipeline based on the tag should be used by triggerring the manual job on the `main` branch -- GitLab