Fixes #33 Add artifactErrorsFailBuild flag

This commit is contained in:
Nick Cipollo
2021-03-21 19:05:15 -04:00
parent 5b1448e480
commit af980963d6
15 changed files with 149 additions and 49 deletions

View File

@@ -6,6 +6,7 @@ import {Artifact} from './Artifact';
export interface Inputs {
readonly allowUpdates: boolean
readonly artifactErrorsFailBuild: boolean
readonly artifacts: Artifact[]
readonly commit: string
readonly createdReleaseBody?: string
@@ -46,11 +47,16 @@ export class CoreInputs implements Inputs {
contentType = 'raw'
}
return this.artifactGlobber
.globArtifactString(artifacts, contentType)
.globArtifactString(artifacts, contentType, this.artifactErrorsFailBuild)
}
return []
}
get artifactErrorsFailBuild(): boolean {
const allow = core.getInput('artifactErrorsFailBuild')
return allow == 'true'
}
get createdReleaseBody(): string | undefined {
if (CoreInputs.omitBody) return undefined
return this.body