Skip to content

Commit

Permalink
feat: allow output option without a token (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
497363983 committed Oct 8, 2023
1 parent c42db7a commit d553036
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ cli
return
}

if (typeof config.output === 'string') {
await fs.writeFile(config.output, md, 'utf-8')
console.log(yellow(`Saved to ${config.output}`))
return
}

if (!config.token) {
console.error(red('No GitHub token found, specify it via GITHUB_TOKEN env. Release skipped.'))
process.exitCode = 1
printWebUrl()
return
}

if (typeof config.output === 'string') {
await fs.writeFile(config.output, md, 'utf-8')
console.log(yellow(`Saved to ${config.output}`))
return
}

if (!await hasTagOnGitHub(config.to, config)) {
console.error(yellow(`Current ref "${bold(config.to)}" is not available as tags on GitHub. Release skipped.`))
process.exitCode = 1
Expand Down

0 comments on commit d553036

Please sign in to comment.