ci(hooks): добавить commit-msg и шаблон Conventional Commits
quality / commitlint (push) Skipped
CD / update-wiki (push) Successful in 6s
quality / changes (push) Successful in 4s
quality / docker-check (push) Skipped
quality / web (push) Successful in 57s
quality / api (push) Successful in 41s
CD / quality (push) Successful in 1m46s
CD / publish (push) Successful in 11m48s

Без type/scope semantic-release не ставил тег и пропускал bake.
This commit is contained in:
Denozordec
2026-09-04 13:43:48 +07:00
parent dd3c378b5f
commit 64e6df8703
8 changed files with 120 additions and 25 deletions
+17 -1
View File
@@ -45,6 +45,11 @@ for (const { hash, subject } of commits) {
unparseable.push({ hash: hash.slice(0, 7), subject });
continue;
}
// semantic-release expects lowercase types (feat|fix|…); "Refactor: …" is not releasable.
if (parsed.type !== parsed.type.toLowerCase()) {
unparseable.push({ hash: hash.slice(0, 7), subject });
continue;
}
if (RELEASABLE.has(parsed.type)) {
releasable.push({ hash: hash.slice(0, 7), subject, type: parsed.type });
}
@@ -64,9 +69,20 @@ if (unparseable.length > 0) {
}
if (releasable.length > 0) {
console.log(`Releasable since ${tag}: ${releasable.length} commit(s).`);
console.log(`Releasable since ${tag || 'initial'}: ${releasable.length} commit(s).`);
for (const r of releasable) {
console.log(` ${r.hash} ${r.type} ${r.subject}`);
}
} else {
console.warn('::warning:: No releasable commits since last tag — release job will no-op.');
console.warn(
'Need at least one: feat|fix|perf|ci|refactor with Conventional Commits, e.g. feat(fleet): …',
);
if (!tag) {
console.warn(
'::warning:: No git tags yet — first release (v1.0.0) also requires a releasable commit on HEAD history.',
);
}
}
process.exit(0);