From 50a415aaad13e5f2a790ab08a61b15e4013e775f Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 5 Jan 2026 23:34:26 +0100 Subject: [PATCH 1/2] chore: add Release Please GHA workflow --- .github/workflows/commitlint.yml | 16 ++++++++++++++++ .github/workflows/release-please.yml | 18 ++++++++++++++++++ .release-please-manifest.json | 3 +++ CMakeLists.txt | 2 +- include/ncrypto.h | 10 +--------- include/version.h | 18 ++++++++++++++++++ release-please-config.json | 11 +++++++++++ 7 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/commitlint.yml create mode 100644 .github/workflows/release-please.yml create mode 100644 .release-please-manifest.json create mode 100644 include/version.h create mode 100644 release-please-config.json diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..f82bae9 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,16 @@ +name: Conventional Commit Linter + +on: + push: + branches: + - main + pull_request: + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + with: + fetch-depth: 100 + - uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..4c3f24f --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,18 @@ +name: Release Please + +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 + with: + release-type: simple diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..8d7e5f1 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.0.1" +} diff --git a/CMakeLists.txt b/CMakeLists.txt index 1704cd3..e9b3ae0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.28) -project(ncrypto) +project(ncrypto VERSION 1.0.1) # x-release-please-version include(CTest) include(GNUInstallDirs) diff --git a/include/ncrypto.h b/include/ncrypto.h index 6a84162..62cc919 100644 --- a/include/ncrypto.h +++ b/include/ncrypto.h @@ -1884,14 +1884,6 @@ class AeadCtxPointer final { }; #endif -// ============================================================================ -// Version metadata -#define NCRYPTO_VERSION "0.0.1" - -enum { - NCRYPTO_VERSION_MAJOR = 0, - NCRYPTO_VERSION_MINOR = 0, - NCRYPTO_VERSION_REVISION = 1, -}; +#include "version.h" } // namespace ncrypto diff --git a/include/version.h b/include/version.h new file mode 100644 index 0000000..5e30715 --- /dev/null +++ b/include/version.h @@ -0,0 +1,18 @@ +// ============================================================================ +// Version metadata +#ifndef NCRYPTO_VERSION_H_ +#define NCRYPTO_VERSION_H_ + +#define NCRYPTO_VERSION "1.0.1" // x-release-please-version + +namespace ncrypto { + +enum { + NCRYPTO_VERSION_MAJOR = 1, // x-release-please-major + NCRYPTO_VERSION_MINOR = 0, // x-release-please-minor + NCRYPTO_VERSION_REVISION = 1, // x-release-please-patch +}; + +} // namespace ncrypto + +#endif // NCRYPTO_VERSION_H_ diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..332b057 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,11 @@ +{ + "packages": { + ".": { + "release-type": "simple", + "extra-files": [ + "CMakeLists.txt", + "include/version.h" + ] + } + } +} From ca513cd305b9633ad6824a03242ec8ab9a911703 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 19 Jan 2026 18:36:39 +0100 Subject: [PATCH 2/2] fixup! chore: add Release Please GHA workflow --- include/version.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/version.h b/include/version.h index 5e30715..cf636a0 100644 --- a/include/version.h +++ b/include/version.h @@ -5,14 +5,10 @@ #define NCRYPTO_VERSION "1.0.1" // x-release-please-version -namespace ncrypto { - enum { NCRYPTO_VERSION_MAJOR = 1, // x-release-please-major NCRYPTO_VERSION_MINOR = 0, // x-release-please-minor NCRYPTO_VERSION_REVISION = 1, // x-release-please-patch }; -} // namespace ncrypto - #endif // NCRYPTO_VERSION_H_