From 29f0f4df0774f5c91ff25ed67b72c751919f6e8d Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Date: Fri, 15 May 2026 22:51:21 +0000
Subject: [PATCH] build(fix): update version numbers and fix release setup
---
/dev/null | 107 -----------------------------------
CONTRIBUTING.md | 13 +--
package-lock.json | 4
.vscode/settings.json | 2
package.json | 9 +-
.release-it.ts | 34 +++++-----
6 files changed, 29 insertions(+), 140 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index ebe0afa..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-name: Release
-
-on:
- workflow_dispatch:
-
-permissions:
- contents: write
- id-token: write
-
-concurrency:
- group: release-main
- cancel-in-progress: false
-
-jobs:
- release:
- name: Release from main
- runs-on: ubuntu-latest
-
- environment:
- name: production
-
- if: github.ref == 'refs/heads/main'
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- with:
- fetch-depth: 0
- persist-credentials: true
-
- - name: Setup Node.js
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
- with:
- node-version: 22
- registry-url: "https://registry.npmjs.org"
-
- - name: Install dependencies
- run: npm ci
-
- - name: Run checks
- run: npm test
-
- - name: Release
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run release
diff --git a/.release-it.publish.ts b/.release-it.publish.ts
deleted file mode 100644
index 116551e..0000000
--- a/.release-it.publish.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-import type { Config } from "release-it";
-
-interface ConventionalCommitLike {
- type?: string;
- notes?: unknown[];
-}
-
-const config: Config = {
- git: {
- requireBranch: "main",
- requireCleanWorkingDir: true,
- requireUpstream: true,
- commit: false,
- tag: true,
- push: true,
- tagName: "v${version}",
- pushArgs: ["--follow-tags"],
- },
- github: {
- release: true,
- releaseName: "v${version}",
- skipChecks: true,
- tokenRef: "GITHUB_TOKEN",
- },
- npm: {
- publish: false,
- },
- plugins: {
- "@release-it/conventional-changelog": {
- infile: false,
- preset: {
- name: "conventionalcommits",
- commitUrlFormat:
- "https://github.com/gohugo-ananke/ananke/commit/{{hash}}",
- compareUrlFormat:
- "https://github.com/gohugo-ananke/ananke/compare/{{previousTag}}...{{currentTag}}",
- types: [
- { type: "feat", section: "Features" },
- { type: "fix", section: "Bug Fixes" },
- { type: "build", section: "Build" },
- { type: "chore", section: "Chores" },
- { type: "ci", section: "CI" },
- { type: "docs", section: "Documentation" },
- { type: "perf", section: "Performance" },
- { type: "refactor", section: "Refactoring" },
- { type: "revert", section: "Reverts" },
- { type: "style", section: "Styles" },
- { type: "test", section: "Tests" },
- { type: "ai", section: "AI Instruction Files" },
- ],
- },
- whatBump(commits: ConventionalCommitLike[]) {
- let level: 2 | 1 | 0 | null = null;
-
- for (const commit of commits) {
- const notes = Array.isArray(commit.notes) ? commit.notes : [];
- const type = typeof commit.type === "string" ? commit.type : "";
-
- if (notes.length > 0) {
- return {
- level: 0,
- reason: "There are BREAKING CHANGES.",
- };
- }
-
- if (type === "feat") {
- level = 1;
- continue;
- }
-
- if (
- level === null &&
- [
- "fix",
- "build",
- "chore",
- "ci",
- "docs",
- "perf",
- "refactor",
- "revert",
- "style",
- "test",
- "ai",
- ].includes(type)
- ) {
- level = 2;
- }
- }
-
- if (level === null) {
- return false;
- }
-
- return {
- level,
- reason:
- level === 1
- ? "There are feature commits."
- : "There are patch-level changes.",
- };
- },
- },
- },
-} satisfies Config;
-
-export default config;
diff --git a/.release-it.prepare.ts b/.release-it.ts
similarity index 82%
rename from .release-it.prepare.ts
rename to .release-it.ts
index d8d819b..411379f 100644
--- a/.release-it.prepare.ts
+++ b/.release-it.ts
@@ -12,14 +12,14 @@
encoding: "utf8",
stdio: ["ignore", "pipe", "pipe"],
}).trim();
- } catch (error) {
+ } catch (error: unknown) {
console.error("Failed to determine the current Git branch.");
console.error(error);
process.exit(1);
}
}
-function hasPreReleaseFlag(argv: string[]): boolean {
+function isPreReleaseRun(argv: string[]): boolean {
return argv.some((argument) => {
return (
argument === "--preRelease" ||
@@ -30,41 +30,41 @@
});
}
-const branch = getCurrentBranch();
-const isPreRelease = hasPreReleaseFlag(process.argv);
+const currentBranch = getCurrentBranch();
+const preReleaseRun = isPreReleaseRun(process.argv);
-if (isPreRelease && branch !== "staging") {
+if (preReleaseRun && currentBranch !== "development") {
console.error(
- `Pre-releases are only allowed from "staging". Current branch: "${branch}".`,
+ `Pre-releases are only allowed on "development". Current branch: "${currentBranch}".`,
);
process.exit(1);
}
-if (!isPreRelease && branch !== "maintenance" && branch !== "staging") {
+if (!preReleaseRun && currentBranch !== "main") {
console.error(
- `Stable releases are only allowed from "maintenance" and "staging". Current branch: "${branch}".`,
+ `Stable releases are only allowed on "main". Current branch: "${currentBranch}".`,
);
process.exit(1);
}
-const config: Config = {
+const config = {
+ npm: {
+ publish: false,
+ },
git: {
requireCleanWorkingDir: true,
- requireUpstream: true,
- requireCommits: true,
- requireBranch: branch,
+ requireBranch: currentBranch,
commit: true,
commitMessage: "chore(release): v${version}",
commitArgs: ["--no-verify"],
- tag: false,
+ tag: true,
+ tagName: "v${version}",
push: true,
+ pushArgs: ["--follow-tags"],
},
github: {
release: false,
},
- npm: {
- publish: false,
- },
plugins: {
"@release-it/conventional-changelog": {
infile: "CHANGELOG.md",
@@ -144,4 +144,4 @@
},
} satisfies Config;
-export default config;
+export default config;
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 30d2876..01a5e45 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -25,7 +25,7 @@
},
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
- "package.json": "package-lock.json, netlify.toml, .lintstagedrc.js, .release-it.*.ts, .markdownlint*, .nvmrc, lychee.toml, tsconfig.json, .coderabbit.yaml",
+ "package.json": "package-lock.json, netlify.toml, .lintstagedrc.js, .release-it.ts, .markdownlint*, .nvmrc, lychee.toml, tsconfig.json, .coderabbit.yaml",
"theme.toml": "go.mod, go.sum",
"README.md": "CHANGELOG.md, LICENSE.md, CONTRIBUTING.md, RELEASES.md, DESIGN.md",
"*.ts": "$(capture).md, $(capture).test.ts, $(capture).spec.ts, $(capture).d.ts, $(capture).map, $(capture).js, $(capture).jsx, $(capture).tsx"
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index fbba7d8..9b8eecf 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -33,7 +33,7 @@
The project follows a structured release workflow based on conventional commits, staging branches, and automated versioning.
-For details, see [RELEASES.md](./RELEASES.md).
+For details, see [Branch Strategy](#branch-strategy).
## Before You Start
@@ -73,11 +73,9 @@
```mermaid
flowchart LR
feature["feature/*, fix/*, docs/*, refactor/*"] --> development
- development --> staging
- maintenance --> staging
- staging --> main
- main --> staging
- staging --> development
+ development --> main
+ maintenance --> main
+ main --> development
```
This repository uses a linear, rebase-based branch model. Long-lived branches MUST stay connected to `main`, and merge commits MUST NOT be introduced.
@@ -87,8 +85,7 @@
| Branch | Purpose | Release role | Write policy | Merge |
| --- | --- | --- | --- | --- |
| `main` | Stable source of truth | releases | Protected. Only receives reviewed PRs from `staging` or `maintenance`. | Rebase |
-| `staging` | Pre-release integration | pre-releases | Protected. Only receives reviewed PRs from `development`. | Rebase |
-| `development` | Active development | none | Feature, fix, chore, and documentation PRs target this branch. | Squash |
+| `development` | Active development | pre-releases | Feature, fix, chore, and documentation PRs target this branch. | Squash |
| `maintenance` | Dependency maintenance | none | Maintainer-only branch for dependency version updates. | Rebase |
### Branch naming
diff --git a/package-lock.json b/package-lock.json
index 2e79cf3..257e8e1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@gohugo-ananke/ananke",
- "version": "2.14.0",
+ "version": "2.15.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@gohugo-ananke/ananke",
- "version": "2.14.0",
+ "version": "2.15.0",
"license": "MIT",
"dependencies": {
"cssnano": "8.0.1",
diff --git a/package.json b/package.json
index e555db5..655fc29 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@gohugo-ananke/ananke",
"description": "Ananke: A theme for Hugo Sites",
- "version": "2.14.0",
+ "version": "2.15.0",
"license": "MIT",
"repository": "gohugo-ananke/ananke",
"author": "Bud Parr (https://github.com/budparr)",
@@ -56,9 +56,8 @@
"lint:markdown": "markdownlint-cli2",
"lint:markdown:fix": "markdownlint-cli2 --fix",
"prepare": "simple-git-hooks install",
- "release": "release-it --config .release-it.publish.ts --ci",
- "release:pre": "release-it --preRelease=prerelease --config .release-it.prepare.ts",
- "release:prepare": "release-it --config .release-it.prepare.ts",
+ "release": "release-it --config .release-it.ts",
+ "release:pre": "release-it --preRelease=prerelease --config .release-it.ts",
"server": "hugo server --environment documentation",
"test": "node scripts/test-hugo-quickstart.ts",
"test:quickstart": "node scripts/test-hugo-quickstart.ts",
@@ -78,4 +77,4 @@
"pre-push": "npm run hook:push"
},
"type": "module"
-}
+}
\ No newline at end of file
--
Gitblit v1.10.0