Add make_latest option (#283)
This commit is contained in:
@@ -97,7 +97,7 @@ class Action {
|
||||
}
|
||||
updateRelease(id) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield this.releases.update(id, this.inputs.tag, this.inputs.updatedReleaseBody, this.inputs.commit, this.inputs.discussionCategory, this.inputs.updatedDraft, this.inputs.updatedReleaseName, this.inputs.updatedPrerelease);
|
||||
return yield this.releases.update(id, this.inputs.tag, this.inputs.updatedReleaseBody, this.inputs.commit, this.inputs.discussionCategory, this.inputs.updatedDraft, this.inputs.makeLatest, this.inputs.updatedReleaseName, this.inputs.updatedPrerelease);
|
||||
});
|
||||
}
|
||||
static noPublishedRelease(error) {
|
||||
@@ -126,7 +126,7 @@ class Action {
|
||||
}
|
||||
createRelease() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield this.releases.create(this.inputs.tag, this.inputs.createdReleaseBody, this.inputs.commit, this.inputs.discussionCategory, this.inputs.createdDraft, this.inputs.generateReleaseNotes, this.inputs.createdReleaseName, this.inputs.createdPrerelease);
|
||||
return yield this.releases.create(this.inputs.tag, this.inputs.createdReleaseBody, this.inputs.commit, this.inputs.discussionCategory, this.inputs.createdDraft, this.inputs.generateReleaseNotes, this.inputs.makeLatest, this.inputs.createdReleaseName, this.inputs.createdPrerelease);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,6 +114,13 @@ class CoreInputs {
|
||||
const generate = core.getInput('generateReleaseNotes');
|
||||
return generate == 'true';
|
||||
}
|
||||
get makeLatest() {
|
||||
const makeLatest = core.getInput('makeLatest');
|
||||
if (makeLatest) {
|
||||
return makeLatest;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
get owner() {
|
||||
let owner = core.getInput('owner');
|
||||
if (owner) {
|
||||
|
||||
@@ -15,7 +15,7 @@ class GithubReleases {
|
||||
this.inputs = inputs;
|
||||
this.git = git;
|
||||
}
|
||||
create(tag, body, commitHash, discussionCategory, draft, generateReleaseNotes, name, prerelease) {
|
||||
create(tag, body, commitHash, discussionCategory, draft, generateReleaseNotes, makeLatest, name, prerelease) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// noinspection TypeScriptValidateJSTypes
|
||||
return this.git.rest.repos.createRelease({
|
||||
@@ -24,6 +24,7 @@ class GithubReleases {
|
||||
discussion_category_name: discussionCategory,
|
||||
draft: draft,
|
||||
generate_release_notes: generateReleaseNotes,
|
||||
make_latest: makeLatest,
|
||||
owner: this.inputs.owner,
|
||||
prerelease: prerelease,
|
||||
repo: this.inputs.repo,
|
||||
@@ -67,7 +68,7 @@ class GithubReleases {
|
||||
});
|
||||
});
|
||||
}
|
||||
update(id, tag, body, commitHash, discussionCategory, draft, name, prerelease) {
|
||||
update(id, tag, body, commitHash, discussionCategory, draft, makeLatest, name, prerelease) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// noinspection TypeScriptValidateJSTypes
|
||||
return this.git.rest.repos.updateRelease({
|
||||
@@ -76,6 +77,7 @@ class GithubReleases {
|
||||
name: name,
|
||||
discussion_category_name: discussionCategory,
|
||||
draft: draft,
|
||||
make_latest: makeLatest,
|
||||
owner: this.inputs.owner,
|
||||
prerelease: prerelease,
|
||||
repo: this.inputs.repo,
|
||||
|
||||
Reference in New Issue
Block a user