Fixes #26 Update dependencies and fix octokit types

Fixes #27 Add inputs for specifying owner and repo
This commit is contained in:
Nick Cipollo
2021-02-09 20:46:38 -05:00
parent 970fd8405b
commit 09eb035337
15 changed files with 525 additions and 482 deletions

View File

@@ -11,8 +11,10 @@ export interface Inputs {
readonly createdReleaseBody?: string
readonly createdReleaseName?: string
readonly draft: boolean
readonly owner: string
readonly prerelease: boolean
readonly replacesArtifacts: boolean
readonly repo: string
readonly tag: string
readonly token: string
readonly updatedReleaseBody?: string
@@ -99,6 +101,14 @@ export class CoreInputs implements Inputs {
return draft == 'true'
}
get owner(): string {
let owner = core.getInput('owner')
if (owner) {
return owner
}
return this.context.repo.owner
}
get prerelease(): boolean {
const preRelease = core.getInput('prerelease')
return preRelease == 'true'
@@ -109,6 +119,14 @@ export class CoreInputs implements Inputs {
return replaces == 'true'
}
get repo(): string {
let repo = core.getInput('repo')
if (repo) {
return repo
}
return this.context.repo.repo
}
get tag(): string {
const tag = core.getInput('tag')
if (tag) {