diff --git a/CHANGELOG.md b/CHANGELOG.md index a716c3e..3209493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **`NotificationConfigCreate` schema test failure**: `NotificationConfigBase.name` was a required field (`...`) but the unit test and the database column both use a default of `"My Notification"`. Changed the Pydantic field to `default="My Notification"` to match the DB default and allow callers to omit the field. ### Added +- **Automatic release numbers** (`pyproject.toml`): Added `version_toml = ["pyproject.toml:project.version"]` to `[tool.semantic_release]` so that `python-semantic-release` now writes the computed version back into the `project.version` field of `pyproject.toml` on every release. The field is initialised to `0.0.0` and will be bumped automatically from that point forward. +- **Release badge** (`README.md`): Added a dynamic "GitHub Release" shield that always shows the latest published release tag. +- **Releases section** (`README.md`): Added a "Releases" section explaining the Semantic Versioning / Conventional Commits workflow and the version-bump rules. - **Semantic Release** (`release.yml`): Automated versioning and GitHub Release creation on every push to `main` using `python-semantic-release`. Reads conventional-commit prefixes (`feat:`, `fix:`, etc.) to determine the next version and updates `CHANGELOG.md`. - **`pyproject.toml`**: Project metadata and `[tool.semantic_release]` configuration for `python-semantic-release`. - **GitOps auto-deployment** (step in `ci.yml`): After a successful Docker build on `main`, a new `update-k8s-manifest` job checks out `christianlouis/k8s-cluster-state` (using the `GH_PAT` secret) and updates the backend and frontend image tags in `apps/gmail-puller/preprod/gmail-puller-stack.yaml` to the new `main-` image, then commits and pushes. diff --git a/README.md b/README.md index 009d184..ccf931f 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Lint](https://github.com/christianlouis/inboxconverge/actions/workflows/lint.yml/badge.svg)](https://github.com/christianlouis/inboxconverge/actions/workflows/lint.yml) [![Security Scan](https://github.com/christianlouis/inboxconverge/actions/workflows/security.yml/badge.svg)](https://github.com/christianlouis/inboxconverge/actions/workflows/security.yml) [![Docker Build](https://github.com/christianlouis/inboxconverge/actions/workflows/docker-build.yml/badge.svg)](https://github.com/christianlouis/inboxconverge/actions/workflows/docker-build.yml) +[![GitHub Release](https://img.shields.io/github/v/release/christianlouis/InboxConverge?sort=semver&label=release)](https://github.com/christianlouis/InboxConverge/releases/latest) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/) [![Docker](https://img.shields.io/badge/docker-ready-blue.svg)](https://www.docker.com/) @@ -239,6 +240,28 @@ Detailed documentation lives in the [`docs/`](docs/) directory: | [Coding Patterns](docs/CODING_PATTERNS.md) | Code style and conventions | | [SaaS README](docs/README_SAAS.md) | Multi-tenant SaaS platform details | +## Releases + +This project uses [Semantic Versioning](https://semver.org/) and +[Conventional Commits](https://www.conventionalcommits.org/) to automate +release numbering. Every push to `main` triggers the +[Semantic Release workflow](.github/workflows/release.yml), which: + +1. Inspects commit messages since the last release. +2. Determines the next version number (`patch`, `minor`, or `major`) based on + the commit prefixes (`fix:`, `feat:`, `feat!:` / `BREAKING CHANGE`). +3. Creates a git tag (`vX.Y.Z`), updates the `version` field in + `pyproject.toml`, generates a GitHub Release with release notes, and + updates `CHANGELOG.md` — all automatically. + +| Commit prefix | Version bump | +|---------------|-------------| +| `fix:`, `perf:` | Patch (`0.0.x`) | +| `feat:` | Minor (`0.x.0`) | +| `feat!:` / `BREAKING CHANGE` | Major (`x.0.0`) | + +Browse all releases on the [Releases page](https://github.com/christianlouis/InboxConverge/releases). + ## Contributing Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on: diff --git a/pyproject.toml b/pyproject.toml index f35fabe..5e41677 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "inboxconverge" -dynamic = ["version"] +version = "0.0.0" description = "Multi-account email forwarding and processing service" readme = "README.md" requires-python = ">=3.12" @@ -20,6 +20,7 @@ Issues = "https://github.com/christianlouis/InboxConverge/issues" Changelog = "https://github.com/christianlouis/InboxConverge/blob/main/CHANGELOG.md" [tool.semantic_release] +version_toml = ["pyproject.toml:project.version"] version_source = "tag" commit_version_number = true tag_format = "v{version}"