allow creating draft releases without a tag (#95)

Co-authored-by: Doug Tangren <d.tangren@gmail.com>
This commit is contained in:
Daiki Mizukami 2021-07-25 23:10:03 +00:00 committed by softprops
parent 4204c40f52
commit 3c49988886
2 changed files with 10 additions and 3 deletions

View file

@ -7,7 +7,11 @@ import { env } from "process";
async function run() {
try {
const config = parseConfig(env);
if (!config.input_tag_name && !isTag(config.github_ref)) {
if (
!config.input_tag_name &&
!isTag(config.github_ref) &&
!config.input_draft
) {
throw new Error(`⚠️ GitHub Releases requires a tag`);
}
if (config.input_files) {