diff --git a/src/cmd/release.ts b/src/cmd/release.ts index 09ac82a..951688b 100644 --- a/src/cmd/release.ts +++ b/src/cmd/release.ts @@ -46,6 +46,7 @@ export async function release({ description: releaseDescription, name: nextVersion, prerelease: shouldBeRC, + target: config.ci.releaseBranch, }); console.log(c.green('# Successfully created release:'), releaseLink); diff --git a/src/forges/forge.ts b/src/forges/forge.ts index 99980f5..6eecf46 100644 --- a/src/forges/forge.ts +++ b/src/forges/forge.ts @@ -33,6 +33,7 @@ export abstract class Forge { name: string; description: string; prerelease?: boolean; + target: string; }): Promise<{ releaseLink: string; }>; diff --git a/src/forges/gitea.ts b/src/forges/gitea.ts index ed030c9..4263c85 100644 --- a/src/forges/gitea.ts +++ b/src/forges/gitea.ts @@ -72,12 +72,14 @@ export class GiteaForge extends Forge { name: string; description: string; prerelease?: boolean; + target: string; }): Promise<{ releaseLink: string }> { const release = await this.api.repos.repoCreateRelease(options.owner, options.repo, { tag_name: options.tag, name: options.name, body: options.description, prerelease: options.prerelease, + target_commitish: options.target, }); return { releaseLink: release.data.html_url! }; diff --git a/src/forges/github.ts b/src/forges/github.ts index 26c31ee..1f1ecee 100644 --- a/src/forges/github.ts +++ b/src/forges/github.ts @@ -61,6 +61,7 @@ export class GithubForge extends Forge { name: string; description: string; prerelease?: boolean; + target: string; }): Promise<{ releaseLink: string }> { const release = await this.octokit.repos.createRelease({ owner: options.owner, @@ -69,6 +70,7 @@ export class GithubForge extends Forge { name: options.name, body: options.description, prerelease: options.prerelease, + target_commitish: options.target, }); return { releaseLink: release.data.html_url };