Fixes #26 Update dependencies and fix octokit types
Fixes #27 Add inputs for specifying owner and repo
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user