@peiyanlu/release 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +154 -19
- package/dist/action.mjs +161 -165
- package/dist/cli.mjs +118 -146
- package/dist/index.d.mts +10 -102
- package/dist/index.mjs +80 -263
- package/package.json +16 -16
- package/template/release.workflow.hbs +140 -0
- package/template/release.text +0 -82
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,6 @@ import { FinalTemplateContext } from "@conventional-changelog/template";
|
|
|
5
5
|
import { ReleaseType } from "semver";
|
|
6
6
|
import { Octokit, Octokit as Octokit$1 } from "@octokit/rest";
|
|
7
7
|
import { getOctokit } from "@actions/github";
|
|
8
|
-
//#region src/core/changelog/changelog.types.d.ts
|
|
9
8
|
export interface ChangelogOptions {
|
|
10
9
|
pkgDir?: string;
|
|
11
10
|
tagPrefix?: string;
|
|
@@ -21,8 +20,6 @@ export interface ChangelogOptions {
|
|
|
21
20
|
version?: string;
|
|
22
21
|
previousTag?: string;
|
|
23
22
|
}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/core/changelog/changelog.d.ts
|
|
26
23
|
interface LastRelease {
|
|
27
24
|
version: string;
|
|
28
25
|
notes: string;
|
|
@@ -47,16 +44,10 @@ export declare class Changelog {
|
|
|
47
44
|
read(): Promise<string>;
|
|
48
45
|
write(): Promise<string>;
|
|
49
46
|
}
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region src/core/changelog/committype.d.ts
|
|
52
47
|
export declare const defaultTypes: CommitType[];
|
|
53
|
-
//#endregion
|
|
54
|
-
//#region src/core/changelog/templates.d.ts
|
|
55
48
|
export declare function headerPartial(context: FinalTemplateContext): string;
|
|
56
49
|
export declare function preamblePartial(contest: FinalTemplateContext): string;
|
|
57
50
|
export declare function template(context: FinalTemplateContext): string;
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/core/logger.d.ts
|
|
60
51
|
export type Printer = (message: LoggerMessage) => void;
|
|
61
52
|
export type Color = (text: string) => string;
|
|
62
53
|
export interface LoggerOptions {
|
|
@@ -105,16 +96,12 @@ export declare class Logger {
|
|
|
105
96
|
createChild(stage: string): ChildLogger;
|
|
106
97
|
private getColor;
|
|
107
98
|
}
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region src/core/manifest/manifest.types.d.ts
|
|
110
99
|
export interface ProjectManifestVersionUpdate {
|
|
111
100
|
name: string;
|
|
112
101
|
from: string;
|
|
113
102
|
to: string;
|
|
114
103
|
files: string[];
|
|
115
104
|
}
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region src/core/manifest/manifest.d.ts
|
|
118
105
|
export declare abstract class ProjectManifest<T = Dict> {
|
|
119
106
|
filepath: string;
|
|
120
107
|
static Filename: string;
|
|
@@ -129,23 +116,20 @@ export declare abstract class ProjectManifest<T = Dict> {
|
|
|
129
116
|
abstract writeVersion(versin: string, dryRun?: boolean): Promise<ProjectManifestVersionUpdate>;
|
|
130
117
|
getPrereleaseVersion(): Promise<readonly (string | number)[] | null>;
|
|
131
118
|
}
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region src/core/utils.d.ts
|
|
134
119
|
interface HostedGitInfo {
|
|
120
|
+
origin: string;
|
|
135
121
|
host: string;
|
|
122
|
+
hostname: string;
|
|
123
|
+
port: string;
|
|
136
124
|
prefix: string;
|
|
137
125
|
owner: string;
|
|
138
126
|
repo: string;
|
|
139
127
|
}
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region src/core/manifest/packageJson.types.d.ts
|
|
142
128
|
export interface PackageJsonProps extends Dict<any> {
|
|
143
129
|
name: string;
|
|
144
130
|
version: string;
|
|
145
131
|
private?: boolean;
|
|
146
132
|
}
|
|
147
|
-
//#endregion
|
|
148
|
-
//#region src/core/manifest/packageJson.d.ts
|
|
149
133
|
export declare class PackageJsonManifest<T extends PackageJsonProps = PackageJsonProps> extends ProjectManifest<T> {
|
|
150
134
|
static override Filename: string;
|
|
151
135
|
contents?: string;
|
|
@@ -157,8 +141,6 @@ export declare class PackageJsonManifest<T extends PackageJsonProps = PackageJso
|
|
|
157
141
|
writeVersion(version: string, dryRun?: boolean): Promise<ProjectManifestVersionUpdate>;
|
|
158
142
|
private contentsMutex?;
|
|
159
143
|
}
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region src/core/manifest/composed.d.ts
|
|
162
144
|
export declare class ComposedProjectManifest<T = Dict> extends ProjectManifest<T> {
|
|
163
145
|
mainManifest: ProjectManifest<T>;
|
|
164
146
|
subManifests: ProjectManifest[];
|
|
@@ -171,8 +153,6 @@ export declare class ComposedProjectManifest<T = Dict> extends ProjectManifest<T
|
|
|
171
153
|
isPrivate(): Promise<boolean>;
|
|
172
154
|
writeVersion(version: string, dryRun?: boolean): Promise<ProjectManifestVersionUpdate>;
|
|
173
155
|
}
|
|
174
|
-
//#endregion
|
|
175
|
-
//#region src/core/project/project.types.d.ts
|
|
176
156
|
export type TagPrefixResolver = (scope: string) => string | Promise<string>;
|
|
177
157
|
export interface ProjectOptions {
|
|
178
158
|
changelogFile?: string;
|
|
@@ -216,16 +196,16 @@ export interface ProjectNextVersionOptions extends ProjectTagPrefixOptions {
|
|
|
216
196
|
* 忽略项目为私有项目这一限制。
|
|
217
197
|
*/
|
|
218
198
|
forcePrivate?: boolean;
|
|
219
|
-
/**
|
|
220
|
-
* 强制升级到指定版本。
|
|
221
|
-
* 未提供时,根据提交记录确定版本。
|
|
222
|
-
*/
|
|
223
|
-
version?: string;
|
|
224
199
|
/**
|
|
225
200
|
* 用于计算升级版本的基准版本。
|
|
226
201
|
* 未提供时,从清单文件中读取版本。
|
|
227
202
|
*/
|
|
228
203
|
baseVersion?: string;
|
|
204
|
+
/**
|
|
205
|
+
* 强制升级到指定版本。
|
|
206
|
+
* 未提供时,根据提交记录确定版本。
|
|
207
|
+
*/
|
|
208
|
+
version?: string;
|
|
229
209
|
/**
|
|
230
210
|
* 要升级到的发布类型。
|
|
231
211
|
* 未提供时,根据提交记录确定版本。
|
|
@@ -266,11 +246,6 @@ export interface ProjectPublishOptions {
|
|
|
266
246
|
/** 发布通道标签。由具体项目类型解释,例如 npm dist-tag 或 GitHub Action 分支别名。 */
|
|
267
247
|
tag?: string | ((version: string, prerelease: readonly (string | number)[] | null) => string);
|
|
268
248
|
}
|
|
269
|
-
export interface ProjectPublishCheckOptions {
|
|
270
|
-
logger?: ChildLogger;
|
|
271
|
-
}
|
|
272
|
-
//#endregion
|
|
273
|
-
//#region src/core/project/monorepo.types.d.ts
|
|
274
249
|
export type MonorepoMode = "fixed" | "independent";
|
|
275
250
|
export type GetProjectsOptions = Simplify<Required<Pick<ProjectOptions, "compose" | "manifest">>>;
|
|
276
251
|
export interface MonorepoProjectOptions extends ProjectOptions {
|
|
@@ -301,7 +276,7 @@ export interface MonorepoProjectOptions extends ProjectOptions {
|
|
|
301
276
|
*/
|
|
302
277
|
tagPrefix?(scope: string): string | Promise<string>;
|
|
303
278
|
}
|
|
304
|
-
type NextVersionKeys = "
|
|
279
|
+
type NextVersionKeys = "version" | "as" | "prerelease" | "snapshot" | "firstRelease";
|
|
305
280
|
type BumpKeys = "skipChangelog" | "releaseCount" | "preamble" | "transformTypes";
|
|
306
281
|
export type MonorepoProjectBumpByProjectOptions = Pick<ProjectBumpOptions, NextVersionKeys | BumpKeys>;
|
|
307
282
|
export interface MonorepoProjectBumpOptions extends Omit<ProjectBumpOptions, "tagPrefix"> {
|
|
@@ -319,8 +294,6 @@ export interface MonorepoProjectBumpOptions extends Omit<ProjectBumpOptions, "ta
|
|
|
319
294
|
*/
|
|
320
295
|
byProject?: Record<string, MonorepoProjectBumpByProjectOptions>;
|
|
321
296
|
}
|
|
322
|
-
//#endregion
|
|
323
|
-
//#region src/core/project/monorepo.d.ts
|
|
324
297
|
export declare abstract class MonorepoProject extends Project {
|
|
325
298
|
readonly mode: MonorepoMode;
|
|
326
299
|
options: MonorepoProjectOptions & ProjectOptions;
|
|
@@ -354,8 +327,6 @@ export declare abstract class MonorepoProject extends Project {
|
|
|
354
327
|
private fixedBump;
|
|
355
328
|
private isIndependentFirstRelease;
|
|
356
329
|
}
|
|
357
|
-
//#endregion
|
|
358
|
-
//#region src/core/project/project.d.ts
|
|
359
330
|
export declare const DEFAULT_TAG_PREFIX = "v";
|
|
360
331
|
export declare const DEFAULT_CHANGELOG_FILE = "CHANGELOG.md";
|
|
361
332
|
export declare const DEFAULT_PUBLISH_TAG = "latest";
|
|
@@ -389,10 +360,7 @@ export declare abstract class Project {
|
|
|
389
360
|
bump(options?: ProjectBumpOptions): Promise<boolean>;
|
|
390
361
|
revert(options?: ProjectRevertOptions, filesSet?: Set<string>): Promise<boolean>;
|
|
391
362
|
abstract publish(options?: ProjectPublishOptions): Promise<void>;
|
|
392
|
-
abstract publishCheck(options?: ProjectPublishCheckOptions): Promise<void>;
|
|
393
363
|
}
|
|
394
|
-
//#endregion
|
|
395
|
-
//#region src/core/hosting/hosting.types.d.ts
|
|
396
364
|
export interface ReleaseData {
|
|
397
365
|
version: string;
|
|
398
366
|
title: string;
|
|
@@ -414,37 +382,23 @@ export interface CreatePullRequestOptions {
|
|
|
414
382
|
dryRun?: boolean;
|
|
415
383
|
logger?: ChildLogger;
|
|
416
384
|
}
|
|
417
|
-
export interface ReleaseCheckOptions {
|
|
418
|
-
logger?: ChildLogger;
|
|
419
|
-
}
|
|
420
|
-
//#endregion
|
|
421
|
-
//#region src/core/hosting/hosting.d.ts
|
|
422
385
|
/** Git 仓库托管服务的基类 */
|
|
423
386
|
export declare abstract class GitRepositoryHosting {
|
|
424
387
|
/** 为提供的项目创建 release */
|
|
425
388
|
abstract createRelease(options: CreateReleaseOptions): Promise<void>;
|
|
426
389
|
/** 未提供的项目创建 pull request */
|
|
427
390
|
abstract createPullRequest(options: CreatePullRequestOptions): Promise<void>;
|
|
428
|
-
/** 检查创建 release 需要的条件 */
|
|
429
|
-
abstract releaseCheck(options?: ReleaseCheckOptions): Promise<void>;
|
|
430
391
|
}
|
|
431
|
-
//#endregion
|
|
432
|
-
//#region src/core/project/packageJson.types.d.ts
|
|
433
392
|
export interface PackageJsonProjectOptions extends Omit<ProjectOptions, "manifest"> {
|
|
434
393
|
/**
|
|
435
394
|
* package.json 文件的路径。
|
|
436
395
|
*/
|
|
437
396
|
path?: string;
|
|
438
397
|
}
|
|
439
|
-
//#endregion
|
|
440
|
-
//#region src/core/project/packageJson.d.ts
|
|
441
398
|
export declare class PackageJsonProject extends Project {
|
|
442
399
|
constructor(options?: Simplify<PackageJsonProjectOptions>);
|
|
443
400
|
override publish(_options?: ProjectPublishOptions): Promise<void>;
|
|
444
|
-
override publishCheck(_options?: ProjectPublishCheckOptions): Promise<void>;
|
|
445
401
|
}
|
|
446
|
-
//#endregion
|
|
447
|
-
//#region src/core/project/packageJsonMonorepo.types.d.ts
|
|
448
402
|
export interface PackageJsonMonorepoProjectOptions extends Omit<MonorepoProjectOptions, "getProjects" | "manifest"> {
|
|
449
403
|
mode: MonorepoMode;
|
|
450
404
|
/**
|
|
@@ -456,18 +410,13 @@ export interface PackageJsonMonorepoProjectOptions extends Omit<MonorepoProjectO
|
|
|
456
410
|
*/
|
|
457
411
|
getProjects(options: GetProjectsOptions): AsyncIterable<string>;
|
|
458
412
|
}
|
|
459
|
-
//#endregion
|
|
460
|
-
//#region src/core/project/packageJsonMonorepo.d.ts
|
|
461
413
|
/**
|
|
462
414
|
* 基于 package.json 的单体仓库项目。
|
|
463
415
|
*/
|
|
464
416
|
export declare class PackageJsonMonorepoProject extends MonorepoProject {
|
|
465
417
|
constructor(options: Simplify<PackageJsonMonorepoProjectOptions>);
|
|
466
418
|
override publish(_options?: ProjectPublishOptions): Promise<void>;
|
|
467
|
-
override publishCheck(_options?: ProjectPublishCheckOptions): Promise<void>;
|
|
468
419
|
}
|
|
469
|
-
//#endregion
|
|
470
|
-
//#region src/core/releaser.type.d.ts
|
|
471
420
|
export type PickOverridableOptions<T extends AnyFunction> = Partial<Omit<Exclude<Parameters<T>[0], undefined>, "dryRun" | "logger" | "tagPrefix" | "project">>;
|
|
472
421
|
export interface ReleaserOptions<P extends Project = Project, G extends GitRepositoryHosting = GitRepositoryHosting> {
|
|
473
422
|
/**
|
|
@@ -537,8 +486,6 @@ export interface ReleaserStepsOptions<P extends Project = Project, G extends Git
|
|
|
537
486
|
}
|
|
538
487
|
export type ReleaserStep = keyof ReleaserStepsOptions;
|
|
539
488
|
export type ReleaserSkipOptions = Partial<Record<ReleaserStep, boolean>>;
|
|
540
|
-
//#endregion
|
|
541
|
-
//#region src/core/releaser.d.ts
|
|
542
489
|
export declare class Releaser<P extends Project = Project, G extends GitRepositoryHosting = GitRepositoryHosting> {
|
|
543
490
|
options: ReleaserOptions<P, G>;
|
|
544
491
|
readonly project: P;
|
|
@@ -572,8 +519,6 @@ export declare class Releaser<P extends Project = Project, G extends GitReposito
|
|
|
572
519
|
protected shouldSkip(step: ReleaserStep): boolean;
|
|
573
520
|
private getBaseBranch;
|
|
574
521
|
}
|
|
575
|
-
//#endregion
|
|
576
|
-
//#region src/config/index.d.ts
|
|
577
522
|
export interface UserConfig<P extends Project = Project, G extends GitRepositoryHosting = GitRepositoryHosting> extends ReleaserStepsOptions<P, G> {
|
|
578
523
|
project?: P;
|
|
579
524
|
hosting?: G;
|
|
@@ -586,8 +531,6 @@ export declare const loadConfig: <T extends object>(cwd?: string) => Promise<{
|
|
|
586
531
|
file: string;
|
|
587
532
|
config: T;
|
|
588
533
|
}>;
|
|
589
|
-
//#endregion
|
|
590
|
-
//#region src/hosting-github/github.type.d.ts
|
|
591
534
|
export interface GithubOptions {
|
|
592
535
|
/**
|
|
593
536
|
* 用于通过 GitHub API 进行身份验证的 GitHub Personal Access Token。
|
|
@@ -632,8 +575,6 @@ export interface ListPullRequestOptions {
|
|
|
632
575
|
repo: string;
|
|
633
576
|
from: string;
|
|
634
577
|
}
|
|
635
|
-
//#endregion
|
|
636
|
-
//#region src/hosting-github/github.d.ts
|
|
637
578
|
export declare class GithubHosting extends GitRepositoryHosting {
|
|
638
579
|
private readonly options;
|
|
639
580
|
readonly octokit: Octokit;
|
|
@@ -641,7 +582,6 @@ export declare class GithubHosting extends GitRepositoryHosting {
|
|
|
641
582
|
constructor(options?: GithubOptions);
|
|
642
583
|
createRelease(options: CreateReleaseOptions): Promise<void>;
|
|
643
584
|
createPullRequest(options: GithubCreatePullRequestOptions): Promise<void>;
|
|
644
|
-
releaseCheck(options?: ReleaseCheckOptions): Promise<void>;
|
|
645
585
|
getRepositoryId(project: Project): Promise<RepositoryId>;
|
|
646
586
|
private uploadAssets;
|
|
647
587
|
private getRelease;
|
|
@@ -649,8 +589,6 @@ export declare class GithubHosting extends GitRepositoryHosting {
|
|
|
649
589
|
private getDefaultBranch;
|
|
650
590
|
private getPullRequestData;
|
|
651
591
|
}
|
|
652
|
-
//#endregion
|
|
653
|
-
//#region src/project-github-action/publish.d.ts
|
|
654
592
|
export interface PublishOptions extends ProjectPublishOptions {
|
|
655
593
|
/**
|
|
656
594
|
* 发布引用前要运行的构建或安装命令。
|
|
@@ -667,8 +605,6 @@ export interface PublishOptions extends ProjectPublishOptions {
|
|
|
667
605
|
env?: Record<string, string | undefined>;
|
|
668
606
|
}
|
|
669
607
|
export declare const publish: (project: NodeGithubActionProject, options?: PublishOptions) => Promise<void>;
|
|
670
|
-
//#endregion
|
|
671
|
-
//#region src/project-github-action/project.d.ts
|
|
672
608
|
export interface NodeGithubActionProjectOptions extends PackageJsonProjectOptions {
|
|
673
609
|
/**
|
|
674
610
|
* 版本标签的前缀。
|
|
@@ -687,12 +623,9 @@ export declare class NodeGithubActionProject extends PackageJsonProject {
|
|
|
687
623
|
*/
|
|
688
624
|
override getLastReleaseTag(options?: ProjectReleaseOptions): Promise<string | undefined>;
|
|
689
625
|
override publish(options?: NodeGithubActionProjectPublishOptions): Promise<void>;
|
|
690
|
-
override publishCheck(options: ProjectPublishCheckOptions): Promise<void>;
|
|
691
626
|
constructor(options?: NodeGithubActionProjectOptions);
|
|
692
627
|
private isReachableFromHead;
|
|
693
628
|
}
|
|
694
|
-
//#endregion
|
|
695
|
-
//#region src/project-npm/publish.d.ts
|
|
696
629
|
interface CleanupOptions$1 {
|
|
697
630
|
/** 是否清理项目内容后再发布 */
|
|
698
631
|
cleanPublish?: boolean;
|
|
@@ -709,18 +642,13 @@ interface PublishOptions$2 extends ProjectPublishOptions, CleanupOptions$1 {
|
|
|
709
642
|
otp?: string;
|
|
710
643
|
env?: Record<string, string | undefined>;
|
|
711
644
|
}
|
|
712
|
-
//#endregion
|
|
713
|
-
//#region src/project-npm/project.d.ts
|
|
714
645
|
export type NpmProjectOptions = PackageJsonProjectOptions;
|
|
715
646
|
export type NpmProjectBumpOptions = ProjectBumpOptions;
|
|
716
647
|
export type NpmProjectPublishOptions = PublishOptions$2;
|
|
717
648
|
/** 一个基于 npm 的项目,使用 package.json 进行配置 */
|
|
718
649
|
export declare class NpmProject extends PackageJsonProject {
|
|
719
650
|
override publish(options?: NpmProjectPublishOptions): Promise<void>;
|
|
720
|
-
override publishCheck(options?: ProjectPublishCheckOptions): Promise<void>;
|
|
721
651
|
}
|
|
722
|
-
//#endregion
|
|
723
|
-
//#region src/project-npm/workspacesProject.d.ts
|
|
724
652
|
export type NpmWorkspacesProjectOptions = Omit<PackageJsonMonorepoProjectOptions, "getProjects">;
|
|
725
653
|
export type NpmWorkspacesProjectBumpOptions = ProjectBumpOptions;
|
|
726
654
|
export type NpmWorkspacesProjectPublishOptions = PublishOptions$2;
|
|
@@ -729,10 +657,7 @@ export declare class NpmWorkspacesProject extends PackageJsonMonorepoProject {
|
|
|
729
657
|
static GlobIgnore: string[];
|
|
730
658
|
constructor(options: NpmWorkspacesProjectOptions);
|
|
731
659
|
override publish(options?: NpmWorkspacesProjectPublishOptions): Promise<void>;
|
|
732
|
-
override publishCheck(options?: ProjectPublishCheckOptions): Promise<void>;
|
|
733
660
|
}
|
|
734
|
-
//#endregion
|
|
735
|
-
//#region src/project-pnpm/publish.d.ts
|
|
736
661
|
interface CleanupOptions {
|
|
737
662
|
/** 是否清理项目内容后再发布 */
|
|
738
663
|
cleanPublish?: boolean;
|
|
@@ -751,18 +676,13 @@ interface PublishOptions$1 extends ProjectPublishOptions, CleanupOptions {
|
|
|
751
676
|
/** 是否在发布前执行 git 检查 */
|
|
752
677
|
gitChecks?: boolean;
|
|
753
678
|
}
|
|
754
|
-
//#endregion
|
|
755
|
-
//#region src/project-pnpm/project.d.ts
|
|
756
679
|
export type PnpmProjectOptions = PackageJsonProjectOptions;
|
|
757
680
|
export type PnpmProjectBumpOptions = ProjectBumpOptions;
|
|
758
681
|
export type PnpmProjectPublishOptions = PublishOptions$1;
|
|
759
682
|
/** 一个基于 pnpm 的项目,使用 package.json 进行配置 */
|
|
760
683
|
export declare class PnpmProject extends PackageJsonProject {
|
|
761
684
|
override publish(options?: PnpmProjectPublishOptions): Promise<void>;
|
|
762
|
-
override publishCheck(options?: ProjectPublishCheckOptions): Promise<void>;
|
|
763
685
|
}
|
|
764
|
-
//#endregion
|
|
765
|
-
//#region src/project-pnpm/workspacesProject.d.ts
|
|
766
686
|
export type PnpmWorkspacesProjectOptions = Omit<PackageJsonMonorepoProjectOptions, "getProjects">;
|
|
767
687
|
export type PnpmWorkspacesProjectBumpOptions = ProjectBumpOptions;
|
|
768
688
|
export type PnpmWorkspacesProjectPublishOptions = PublishOptions$1;
|
|
@@ -772,10 +692,7 @@ export declare class PnpmWorkspacesProject extends PackageJsonMonorepoProject {
|
|
|
772
692
|
static GlobIgnore: string[];
|
|
773
693
|
constructor(options: PnpmWorkspacesProjectOptions);
|
|
774
694
|
override publish(options?: PnpmWorkspacesProjectPublishOptions): Promise<void>;
|
|
775
|
-
override publishCheck(options?: ProjectPublishCheckOptions): Promise<void>;
|
|
776
695
|
}
|
|
777
|
-
//#endregion
|
|
778
|
-
//#region src/releaser-github-action/releaser.d.ts
|
|
779
696
|
export interface ReleaserGithubActionOptions<P extends Project = Project> extends Omit<ReleaserOptions<P, GithubHosting>, "hosting"> {
|
|
780
697
|
/** 用于进行 GitHub API 调用的 Octokit 实例 */
|
|
781
698
|
octokit: ReturnType<typeof getOctokit>;
|
|
@@ -794,8 +711,6 @@ export declare class ReleaserGithubAction<P extends Project = Project> extends R
|
|
|
794
711
|
runSnapshotAction(snapshotTag: string): Promise<void>;
|
|
795
712
|
runAction(): Promise<void>;
|
|
796
713
|
}
|
|
797
|
-
//#endregion
|
|
798
|
-
//#region src/releaser-github-action/conditions.d.ts
|
|
799
714
|
export declare const ifReleaseCommit: (releaser: ReleaserGithubAction) => Promise<boolean>;
|
|
800
715
|
/**
|
|
801
716
|
* 检测当前事件是否为针对处于打开状态的发布拉取请求的受支持命令评论:
|
|
@@ -804,8 +719,6 @@ export declare const ifReleaseCommit: (releaser: ReleaserGithubAction) => Promis
|
|
|
804
719
|
* @returns 如果是此类评论,则返回 `目标分支`;如果是评论事件但不是命令评论,则返回 `false`;如果根本不是评论事件,则返回 `null`
|
|
805
720
|
*/
|
|
806
721
|
export declare const ifCommandComment: () => string | false | null;
|
|
807
|
-
//#endregion
|
|
808
|
-
//#region src/releaser-github-action/options.d.ts
|
|
809
722
|
interface InputOptions<T> {
|
|
810
723
|
checkout: Partial<{
|
|
811
724
|
branch: string;
|
|
@@ -816,7 +729,6 @@ interface InputOptions<T> {
|
|
|
816
729
|
prerelease: string;
|
|
817
730
|
snapshot: string;
|
|
818
731
|
firstRelease: boolean;
|
|
819
|
-
skip: boolean;
|
|
820
732
|
/** monorepo bump */
|
|
821
733
|
byProject: T;
|
|
822
734
|
}>;
|
|
@@ -824,7 +736,6 @@ interface InputOptions<T> {
|
|
|
824
736
|
enabled: boolean;
|
|
825
737
|
}>;
|
|
826
738
|
publish: Partial<{
|
|
827
|
-
skip: boolean;
|
|
828
739
|
/** npm publish */
|
|
829
740
|
access: string;
|
|
830
741
|
tag: string;
|
|
@@ -832,11 +743,10 @@ interface InputOptions<T> {
|
|
|
832
743
|
}
|
|
833
744
|
export declare const getInputOptions: <T extends Dict>() => InputOptions<T>;
|
|
834
745
|
export declare const getInputSkippedSteps: () => ReleaserSkipOptions;
|
|
835
|
-
//#endregion
|
|
836
|
-
//#region src/releaser-cli/releaser.d.ts
|
|
837
746
|
export interface ReleaserCliRunOptions {
|
|
838
747
|
dryRun?: boolean;
|
|
839
748
|
ci?: boolean;
|
|
749
|
+
skipBump?: boolean;
|
|
840
750
|
skipGit?: boolean;
|
|
841
751
|
skipPublish?: boolean;
|
|
842
752
|
skipRelease?: boolean;
|
|
@@ -857,10 +767,8 @@ export declare class ReleaserCli<P extends Project = Project, G extends GitRepos
|
|
|
857
767
|
override run(...args: []): Promise<void>;
|
|
858
768
|
setCliOptions(options: ReleaserCliRunOptions): this;
|
|
859
769
|
setLegacyOptions(): this;
|
|
860
|
-
check(): this;
|
|
861
770
|
start(): this;
|
|
862
771
|
end(): void;
|
|
863
772
|
runAction(options: ReleaserCliRunOptions): Promise<void>;
|
|
864
773
|
}
|
|
865
|
-
//#endregion
|
|
866
774
|
export { Octokit };
|