Skip to content

Commit

Permalink
fix(action): use .version-unreleased if dry was used
Browse files Browse the repository at this point in the history
  • Loading branch information
hazcod authored and christophwitzko committed Jan 6, 2021
1 parent 83a7391 commit 54fde9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ async function main () {
return
}
const generatedChangelog = (await fs.readFile(changelogFile)).toString('utf8')
const version = (await fs.readFile('.version')).toString('utf8')
await fs.unlink('.version')
const versionFilename = (core.getInput('dry')) ? '.version-unreleased' : '.version'
const version = (await fs.readFile(versionFilename)).toString('utf8')
await fs.unlink(versionFilename)
const parsedVersion = new SemVer(version)
core.setOutput('changelog', generatedChangelog)
core.debug(`setting version to ${parsedVersion.version}`)
Expand Down

0 comments on commit 54fde9c

Please sign in to comment.