Skip to content

Commit

Permalink
feat: allow setting make_latest for github release
Browse files Browse the repository at this point in the history
  • Loading branch information
bukowa committed Jun 19, 2024
1 parent 3895d89 commit 1a7d5cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ interface TagIteratorOptions {
export interface ReleaseOptions {
draft?: boolean;
prerelease?: boolean;
make_latest?: "true" | "false" | "legacy";
}

export interface GitHubRelease {
Expand Down Expand Up @@ -1390,6 +1391,7 @@ export class GitHub {
draft: !!options.draft,
prerelease: !!options.prerelease,
target_commitish: release.sha,
make_latest: options.make_latest,
});
return {
id: resp.data.id,
Expand Down
4 changes: 4 additions & 0 deletions src/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export interface ReleaserConfig {
extraLabels?: string[];
initialVersion?: string;
signoff?: string;
makeLatest?: 'true' | 'false' | 'legacy';

// Changelog options
changelogSections?: ChangelogSection[];
Expand Down Expand Up @@ -150,6 +151,7 @@ export interface CandidateRelease extends Release {
path: string;
draft?: boolean;
prerelease?: boolean;
make_latest?: "true" | "false" | "legacy";
}

interface ReleaserConfigJson {
Expand Down Expand Up @@ -1158,6 +1160,7 @@ export class Manifest {
config.prerelease &&
(!!release.tag.version.preRelease ||
release.tag.version.major === 0),
make_latest: config.makeLatest,
});
}
}
Expand Down Expand Up @@ -1280,6 +1283,7 @@ export class Manifest {
const githubRelease = await this.github.createRelease(release, {
draft: release.draft,
prerelease: release.prerelease,
make_latest: release.make_latest,
});

return {
Expand Down

0 comments on commit 1a7d5cc

Please sign in to comment.