Skip to content

Commit acd92db

Browse files
authored
chore: add Release Please GHA workflow (#22)
1 parent 03d5ed7 commit acd92db

File tree

7 files changed

+64
-10
lines changed

7 files changed

+64
-10
lines changed

.github/workflows/commitlint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Conventional Commit Linter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
commitlint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
14+
with:
15+
fetch-depth: 100
16+
- uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
17+
with:
18+
release-type: simple

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.0.1"
3+
}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.28)
2-
project(ncrypto)
2+
project(ncrypto VERSION 1.0.1) # x-release-please-version
33

44
include(CTest)
55
include(GNUInstallDirs)

include/ncrypto.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,14 +1884,6 @@ class AeadCtxPointer final {
18841884
};
18851885
#endif
18861886

1887-
// ============================================================================
1888-
// Version metadata
1889-
#define NCRYPTO_VERSION "0.0.1"
1890-
1891-
enum {
1892-
NCRYPTO_VERSION_MAJOR = 0,
1893-
NCRYPTO_VERSION_MINOR = 0,
1894-
NCRYPTO_VERSION_REVISION = 1,
1895-
};
1887+
#include "version.h"
18961888

18971889
} // namespace ncrypto

include/version.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// ============================================================================
2+
// Version metadata
3+
#ifndef NCRYPTO_VERSION_H_
4+
#define NCRYPTO_VERSION_H_
5+
6+
#define NCRYPTO_VERSION "1.0.1" // x-release-please-version
7+
8+
enum {
9+
NCRYPTO_VERSION_MAJOR = 1, // x-release-please-major
10+
NCRYPTO_VERSION_MINOR = 0, // x-release-please-minor
11+
NCRYPTO_VERSION_REVISION = 1, // x-release-please-patch
12+
};
13+
14+
#endif // NCRYPTO_VERSION_H_

release-please-config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"packages": {
3+
".": {
4+
"release-type": "simple",
5+
"extra-files": [
6+
"CMakeLists.txt",
7+
"include/version.h"
8+
]
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)