Add prerelease

This commit is contained in:
Nick Cipollo
2019-12-13 16:05:44 -05:00
parent 5ce722314c
commit cb3417d207
10 changed files with 57 additions and 20 deletions

View File

@@ -14,13 +14,14 @@ class GithubReleases {
this.context = context;
this.git = git;
}
create(tag, body, commitHash, draft, name) {
create(tag, body, commitHash, draft, name, prerelease) {
return __awaiter(this, void 0, void 0, function* () {
return this.git.repos.createRelease({
body: body,
name: name,
draft: draft,
owner: this.context.repo.owner,
prerelease: prerelease,
repo: this.context.repo.repo,
target_commitish: commitHash,
tag_name: tag
@@ -36,7 +37,7 @@ class GithubReleases {
});
});
}
update(id, tag, body, commitHash, draft, name) {
update(id, tag, body, commitHash, draft, name, prerelease) {
return __awaiter(this, void 0, void 0, function* () {
return this.git.repos.updateRelease({
release_id: id,
@@ -44,6 +45,7 @@ class GithubReleases {
name: name,
draft: draft,
owner: this.context.repo.owner,
prerelease: prerelease,
repo: this.context.repo.repo,
target_commitish: commitHash,
tag_name: tag