chore(catalog): initialize production plugin source

This commit is contained in:
2026-09-11 10:58:33 +08:00
commit 557ed8afd0
18 changed files with 596 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
import { api, notifyCatalog, repositoryPath } from './gitea.mjs';
const repository = process.env.GITEA_REPOSITORY;
const tag = process.env.RELEASE_TAG;
if (!tag) throw new Error('RELEASE_TAG is required');
const release = await api(`/repos/${repositoryPath(repository)}/releases/tags/${encodeURIComponent(tag)}`);
if (release.draft || !release.assets.some(asset => asset.name === 'trove-release.json')) throw new Error('A completed release with trove-release.json is required');
await notifyCatalog(repository, tag);