From 31b10d5d50b1a3fe4475a1ff0b9b414d578227cd Mon Sep 17 00:00:00 2001 From: Mika Ayenson Date: Thu, 7 Nov 2024 10:06:09 -0600 Subject: [PATCH] [FR] Update the release versioning process and workflow --- .github/workflows/version-code-and-release.yml | 5 +++++ docs/versioning.md | 8 +++++--- pyproject.toml | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/version-code-and-release.yml b/.github/workflows/version-code-and-release.yml index 3348d15ba1b..81c4cd526f6 100644 --- a/.github/workflows/version-code-and-release.yml +++ b/.github/workflows/version-code-and-release.yml @@ -44,6 +44,11 @@ jobs: with: fetch-depth: 0 + - name: Set github config + run: | + git config --global user.email "72879786+protectionsmachine@users.noreply.github.com" + git config --global user.name "protectionsmachine" + - name: Check if core pyproject.toml was updated run: | BASE_COMMIT="${{ github.event.pull_request.base.sha }}" diff --git a/docs/versioning.md b/docs/versioning.md index b62e1bcc9a8..989ca390829 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -80,6 +80,8 @@ Increment the patch version when making bug fixes, performance improvements, or - Small performance tweaks for the hunting rule management. - **Docs Folder**: - Updates to documentation. +- **JSON Schemas**: + - Recurring update to schema definitions that don't break compatibility (not .py schema updates).

@@ -140,7 +142,7 @@ Increment the major version when introducing backward-incompatible changes that ## Tagging Process -Each release will be tagged using the following format: +Each pyproject.toml update will be tagged using the following format: - **Tag Format**: `dev-vX.Y.Z` (e.g., `dev-v1.2.0`). - **Single Tag for Combined Releases**: If there are changes to the core detection-rules code or libraries (`kql`, `kibana`), they will be tagged together as a single release with the core detection-rules versioning. - **Hunting Folder**: Changes to the hunting logic will be included in the combined release. @@ -151,11 +153,11 @@ Each release will be tagged using the following format: ## When to Trigger a GitHub Release -A draft release will be triggered in the following cases: +A draft release will be triggered on all version updates. For example, in the following cases: - **New Feature or Bug Fix**: Once a feature or bug fix is merged into `main`, a version bump is made according to the semantic versioning rules. - **Version Bump**: After the version bump, a GitHub release will be created using **release-drafter** CI workflow to automate draft release generation. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish quarterly. > [!IMPORTANT] -> Proper PR labels need to be added for this to properly be labeled and added to the draft. +> Releases are published on minor and major version bumps at a minimum. Prior to publishing, the release notes should be reviewed and updated with any additional information, or remove any unnecessary details not related to code changes (which may occur due to release-drafter pulling in all commits). diff --git a/pyproject.toml b/pyproject.toml index a789fc7eeca..29ab0a0e0b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "detection_rules" -version = "0.1.1" +version = "0.1.2" description = "Detection Rules is the home for rules used by Elastic Security. This repository is used for the development, maintenance, testing, validation, and release of rules for Elastic Security’s Detection Engine." readme = "README.md" requires-python = ">=3.12"