feat: implement versioning and release management in the project
CI / changes (push) Successful in 7s
CI / commitlint (push) Has been skipped
CI / openapi (push) Successful in 23s
CI / web (push) Successful in 28s
CI / go (push) Successful in 26s
CI / bird2 (push) Successful in 15s

- Added automatic versioning based on git tags using semantic-release in Gitea Actions.
- Introduced new API endpoints `GET /version` and `GET /v1/version` to expose build metadata.
- Updated Docker build process to include version and build time information in Go binaries.
- Enhanced documentation with details on release processes and versioning guidelines.
- Integrated version display in the web application for better user visibility.
This commit is contained in:
Denozordec
2026-05-20 00:56:02 +07:00
parent 4c23232c4e
commit bb334b10f5
26 changed files with 8210 additions and 190 deletions
@@ -7,6 +7,7 @@
import PanelLeftClose from '@lucide/svelte/icons/panel-left-close';
import PanelLeftOpen from '@lucide/svelte/icons/panel-left-open';
import AppNavLinks from './app-nav-links.svelte';
import AppVersion from './app-version.svelte';
import ThemeMenu from './theme-menu.svelte';
let {
@@ -54,4 +55,5 @@
</div>
<Separator />
<AppNavLinks {collapsed} />
<AppVersion />
</aside>
@@ -0,0 +1,30 @@
<script lang="ts">
import { onMount } from 'svelte';
import { apiJSON } from '$lib/api/client.js';
type VersionInfo = {
version?: string;
api_version?: string;
};
let label = $state<string | null>(null);
onMount(() => {
void (async () => {
try {
const info = await apiJSON<VersionInfo>('/v1/version');
const ver =
(typeof info.version === 'string' && info.version) ||
(typeof info.api_version === 'string' && info.api_version) ||
'';
label = ver ? `v${ver}` : null;
} catch {
label = null;
}
})();
});
</script>
{#if label}
<p class="truncate px-3 pb-3 text-xs text-sidebar-foreground/45" title={label}>{label}</p>
{/if}
+5
View File
@@ -100,8 +100,13 @@
const versionText = $derived.by(() => {
if (!version) return '—';
const ver =
(typeof version.version === 'string' && version.version) ||
(typeof version.api_version === 'string' && version.api_version) ||
'';
const sha =
typeof version.git_sha === 'string' && version.git_sha ? version.git_sha : 'unknown';
if (ver) return `${ver} (${sha.slice(0, 12)})`;
return sha.slice(0, 12);
});