From fe9a35753d6f766340fb397732bd531c23655e10 Mon Sep 17 00:00:00 2001 From: Marcin Barc Date: Sat, 7 Nov 2026 15:23:24 +0100 Subject: [PATCH] chore: introduce develop branch workflow --- .github/workflows/ci.yml | 4 ++-- README.md | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d1fb7a..4d19626 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ main ] + branches: [ main, develop ] pull_request: - branches: [ main ] + branches: [ main, develop ] permissions: contents: read diff --git a/README.md b/README.md index cecdf72..29481d9 100644 --- a/README.md +++ b/README.md @@ -83,11 +83,20 @@ src ## Development workflow -This project follows **trunk-based development**: +``` +feature branch ──PR (squash)──▶ develop ──PR (senior review, merge commit)──▶ main +``` + +| Branch | Purpose | +|-------------|---------------------------------------------------------------| +| `main` | Reviewed, stable code. Updated only from `develop`. | +| `develop` | Integration branch. All feature branches are merged here. | +| `/…` | Short-lived work branch created from `develop`. | -- `main` is always releasable — it must build and pass all tests. -- Every change goes through a short-lived branch and a Pull Request. +- Every change starts from an up-to-date `develop` and goes through a Pull Request. +- Feature → `develop`: **squash and merge**, branch deleted afterwards. +- `develop` → `main`: reviewed by a senior developer, merged with a **merge commit**. +- CI must pass before any merge. - Branch naming: `/`, e.g. `feat/user-registration`. - Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/): `feat`, `fix`, `docs`, `refactor`, `test`, `build`, `ci`, `chore`. -- Pull Requests are merged with **squash and merge** and the branch is deleted afterwards.