Fixes #135 Add support for generate_release_notes
Some checks failed
Test / check_pr (push) Has been cancelled
Some checks failed
Test / check_pr (push) Has been cancelled
This commit is contained in:
@@ -114,6 +114,7 @@ export class Action {
|
||||
this.inputs.commit,
|
||||
this.inputs.discussionCategory,
|
||||
this.inputs.draft,
|
||||
this.inputs.generateReleaseNotes,
|
||||
this.inputs.createdReleaseName,
|
||||
this.inputs.createdPrerelease
|
||||
)
|
||||
|
||||
@@ -8,11 +8,12 @@ export interface Inputs {
|
||||
readonly allowUpdates: boolean
|
||||
readonly artifactErrorsFailBuild: boolean
|
||||
readonly artifacts: Artifact[]
|
||||
readonly commit: string
|
||||
readonly commit?: string
|
||||
readonly createdReleaseBody?: string
|
||||
readonly createdReleaseName?: string
|
||||
readonly discussionCategory?: string
|
||||
readonly draft: boolean
|
||||
readonly generateReleaseNotes: boolean
|
||||
readonly owner: string
|
||||
readonly createdPrerelease: boolean
|
||||
readonly removeArtifacts: boolean
|
||||
@@ -83,8 +84,12 @@ export class CoreInputs implements Inputs {
|
||||
return ''
|
||||
}
|
||||
|
||||
get commit(): string {
|
||||
return core.getInput('commit')
|
||||
get commit(): string | undefined {
|
||||
const commit = core.getInput('commit')
|
||||
if (commit) {
|
||||
return commit
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
get createdReleaseName(): string | undefined {
|
||||
@@ -117,6 +122,11 @@ export class CoreInputs implements Inputs {
|
||||
const draft = core.getInput('draft')
|
||||
return draft == 'true'
|
||||
}
|
||||
|
||||
get generateReleaseNotes(): boolean {
|
||||
const generate = core.getInput('generateReleaseNotes')
|
||||
return generate == 'true'
|
||||
}
|
||||
|
||||
get owner(): string {
|
||||
let owner = core.getInput('owner')
|
||||
|
||||
@@ -24,6 +24,7 @@ export interface Releases {
|
||||
commitHash?: string,
|
||||
discussionCategory?: string,
|
||||
draft?: boolean,
|
||||
generateReleaseNotes?: boolean,
|
||||
name?: string,
|
||||
prerelease?: boolean
|
||||
): Promise<CreateReleaseResponse>
|
||||
@@ -72,6 +73,7 @@ export class GithubReleases implements Releases {
|
||||
commitHash?: string,
|
||||
discussionCategory?: string,
|
||||
draft?: boolean,
|
||||
generateReleaseNotes?: boolean,
|
||||
name?: string,
|
||||
prerelease?: boolean
|
||||
): Promise<CreateReleaseResponse> {
|
||||
@@ -81,6 +83,7 @@ export class GithubReleases implements Releases {
|
||||
name: name,
|
||||
discussion_category_name: discussionCategory,
|
||||
draft: draft,
|
||||
generate_release_notes: generateReleaseNotes,
|
||||
owner: this.inputs.owner,
|
||||
prerelease: prerelease,
|
||||
repo: this.inputs.repo,
|
||||
|
||||
Reference in New Issue
Block a user