@ruan-cat/release-toolkit
Version:
基于 changelogen 增强 changesets 工作流的发布工具包,提供语义化提交解析和 GitHub Release 同步功能。
43 lines (39 loc) • 1.17 kB
text/typescript
export { default as changelogFunctions, generateChangelogFromGitHistory, generateHybridChangelog } from './plugins/changelog-with-changelogen.cjs';
import { ChangelogConfig } from 'changelogen';
import '@changesets/types';
interface PublishedPackage {
name: string;
version: string;
}
interface ChangelogEntry {
version: string;
releaseNotes: string;
date?: string;
}
declare class GitHubReleaseSync {
private options;
private octokit;
private repo;
constructor(options: {
token: string;
repository: string;
});
/**
* 解析 CHANGELOG.md 获取最新版本的发布说明
*/
private parseLatestChangelog;
/**
* 创建或更新 GitHub Release
*/
private createOrUpdateRelease;
/**
* 从已发布的包列表同步到 GitHub Release
*/
syncFromChangesets(publishedPackages: PublishedPackage[]): Promise<void>;
}
/**
* 从环境变量运行同步脚本
*/
declare function runSync(): Promise<void>;
declare const config: Partial<ChangelogConfig>;
export { type ChangelogEntry, GitHubReleaseSync, type PublishedPackage, config as changelogConfig, runSync };