Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add new input, error if file not found
  • Loading branch information
Jacob Bolda committed Feb 4, 2020
1 parent cf2e5a0 commit 15708f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions dist/index.js
Expand Up @@ -7863,11 +7863,12 @@ async function run() {
const tag = tagName.replace('refs/tags/', '');
const releaseName = core.getInput('release_name', { required: true }).replace('refs/tags/', '');
const body = core.getInput('body', { required: false });
const bodyFromFile = core.getInput('bodyFromFile', { required: false });
let bodyFile = null;
try {
bodyFile = fs.readFileSync(body, { encoding: 'string' });
} catch (e) {
// noop
bodyFile = fs.readFileSync(bodyFromFile, { encoding: 'string' });
} catch (error) {
core.setFailed(error.message);
}
const draft = core.getInput('draft', { required: false }) === 'true';
const prerelease = core.getInput('prerelease', { required: false }) === 'true';
Expand Down
7 changes: 4 additions & 3 deletions src/create-release.js
Expand Up @@ -17,11 +17,12 @@ async function run() {
const tag = tagName.replace('refs/tags/', '');
const releaseName = core.getInput('release_name', { required: true }).replace('refs/tags/', '');
const body = core.getInput('body', { required: false });
const bodyFromFile = core.getInput('bodyFromFile', { required: false });
let bodyFile = null;
try {
bodyFile = fs.readFileSync(body, { encoding: 'string' });
} catch (e) {
// noop
bodyFile = fs.readFileSync(bodyFromFile, { encoding: 'string' });
} catch (error) {
core.setFailed(error.message);
}
const draft = core.getInput('draft', { required: false }) === 'true';
const prerelease = core.getInput('prerelease', { required: false }) === 'true';
Expand Down

0 comments on commit 15708f2

Please sign in to comment.