Skip to content

Commit

Permalink
Create prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
rfarine committed Nov 11, 2020
1 parent 744a697 commit 4207629
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,24 @@ async function run() {
const changelog = generateChangelog(formattedCommits);
core.info(changelog);
// Create a github release (type: prerelease) w/ changelog attached

return await octokit.repos.createRelease({
...github.context.repo,
name: tag,
tag_name: tag,
body: changelog,
prerelease: true,
});
}

// If already a prerelease, move to release state
if (prerelease === 'false') {
core.info('hello');
}

return core.setOutput('hi');
return core.setFailed(
'The workflow did not run the necessary steps! Double check your env vars.'
);
} catch (error) {
return core.setFailed(error.message);
}
Expand Down
12 changes: 11 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,24 @@ export async function run() {
const changelog = generateChangelog(formattedCommits);
core.info(changelog);
// Create a github release (type: prerelease) w/ changelog attached

return await octokit.repos.createRelease({
...github.context.repo,
name: tag,
tag_name: tag,
body: changelog,
prerelease: true,
});
}

// If already a prerelease, move to release state
if (prerelease === 'false') {
core.info('hello');
}

return core.setOutput('hi');
return core.setFailed(
'The workflow did not run the necessary steps! Double check your env vars.'
);
} catch (error) {
return core.setFailed(error.message);
}
Expand Down

0 comments on commit 4207629

Please sign in to comment.