mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-10 10:44:19 +00:00
honor body_path input when provided. fixes #22
This commit is contained in:
parent
07c8c20669
commit
ba42ad9139
4 changed files with 69 additions and 4 deletions
10
src/util.ts
10
src/util.ts
|
@ -1,5 +1,5 @@
|
|||
import * as glob from "glob";
|
||||
import { lstatSync } from "fs";
|
||||
import { lstatSync, readFileSync } from "fs";
|
||||
|
||||
export interface Config {
|
||||
github_token: string;
|
||||
|
@ -14,6 +14,14 @@ export interface Config {
|
|||
input_prerelease?: boolean;
|
||||
}
|
||||
|
||||
export const releaseBody = (config: Config): string | undefined => {
|
||||
return (
|
||||
config.input_body ||
|
||||
(config.input_body_path &&
|
||||
readFileSync(config.input_body_path).toString("utf8"))
|
||||
);
|
||||
};
|
||||
|
||||
type Env = { [key: string]: string | undefined };
|
||||
|
||||
export const parseInputFiles = (files: string): string[] => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue