forked from mirrors/action-gh-release
Allow override of target_commitish for updating
This commit is contained in:
parent
60ec4e5f6b
commit
892e2fa87d
3 changed files with 26 additions and 16 deletions
|
@ -99,7 +99,11 @@ describe("util", () => {
|
|||
});
|
||||
describe("parseConfig", () => {
|
||||
it("parses basic config with commitish", () => {
|
||||
assert.deepStrictEqual(parseConfig({INPUT_TARGET_COMMITISH: "affa18ef97bc9db20076945705aba8c516139abd"}), {
|
||||
assert.deepStrictEqual(
|
||||
parseConfig({
|
||||
INPUT_TARGET_COMMITISH: "affa18ef97bc9db20076945705aba8c516139abd"
|
||||
}),
|
||||
{
|
||||
github_ref: "",
|
||||
github_repository: "",
|
||||
github_token: "",
|
||||
|
@ -112,7 +116,8 @@ describe("util", () => {
|
|||
input_tag_name: undefined,
|
||||
input_fail_on_unmatched_files: false,
|
||||
input_target_commitish: "affa18ef97bc9db20076945705aba8c516139abd"
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
describe("isTag", () => {
|
||||
|
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -167,7 +167,12 @@ export const release = async (
|
|||
});
|
||||
|
||||
const release_id = existingRelease.data.id;
|
||||
const target_commitish = existingRelease.data.target_commitish;
|
||||
let target_commitish: string;
|
||||
if (config.input_target_commitish) {
|
||||
target_commitish = config.input_target_commitish;
|
||||
} else {
|
||||
target_commitish = existingRelease.data.target_commitish;
|
||||
}
|
||||
const tag_name = tag;
|
||||
const name = config.input_name || tag;
|
||||
const body = `${existingRelease.data.body}\n${releaseBody(config)}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue