- use different pen for write logs

- remove default value for configuration, to cleanly fallback to defaults
- rename gitHelper, move dir exists helper
- add reading input values group
- improve warning for configuration
This commit is contained in:
Mike Penz
2020-10-17 19:37:11 +02:00
parent 1e0f6ab49e
commit bd49950417
7 changed files with 78 additions and 76 deletions
+4 -4
View File
@@ -1,12 +1,13 @@
import * as core from '@actions/core'
import {readConfiguration} from './utils'
import {ReleaseNotes} from './releaseNotes'
import {createCommandManager} from './git-helper'
import {createCommandManager} from './gitHelper'
import * as github from '@actions/github'
import * as path from 'path'
import {DefaultConfiguration} from './configuration'
async function run(): Promise<void> {
core.startGroup(`📘 Reading input values`)
try {
let githubWorkspacePath = process.env['GITHUB_WORKSPACE']
if (!githubWorkspacePath) {
@@ -29,9 +30,7 @@ async function run(): Promise<void> {
core.debug(`configurationPath = '${configurationPath}'`)
const providedConfiguration = readConfiguration(configurationPath)
if (!providedConfiguration) {
core.error(
`Configuration provided, but it couldn't be found, or failed to parse`
)
core.info(`⚠️ Configuration provided, but it couldn't be found, or failed to parse. Fallback to Defaults`)
} else {
configuration = providedConfiguration
}
@@ -94,6 +93,7 @@ async function run(): Promise<void> {
} else {
core.debug(`Resolved 'toTag' as ${toTag}`)
}
core.endGroup()
const releaseNotes = new ReleaseNotes({
owner,