Skip to content

Instantly share code, notes, and snippets.

@gemmadlou
Created December 30, 2019 08:02
Show Gist options
  • Save gemmadlou/a6c2b56c794ffc0d7b9a1a105fb5e913 to your computer and use it in GitHub Desktop.
Save gemmadlou/a6c2b56c794ffc0d7b9a1a105fb5e913 to your computer and use it in GitHub Desktop.
Publishes new release (no branches)
/**
* Publishes new release
*
* @param {object} inject
* @param {GetLastCommit} inject.getLastCommit
* @param {GetPackage} inject.getPackage
* @param {UpdatePackage} inject.updatePackage
* @param {CommitNewVersion} inject.commitNewVersion
* @param {TagNewVersion} inject.tagNewVersion
* @param {PushCommit} inject.pushCommit
* @param {PackageArtefact} inject.packageArtefact
* @param {SaveArtefact} inject.saveArtefact
* @returns {(input: WorkflowDTO) => Promise<WorkflowDTO>}
*/
module.exports.publish = (inject) => ( /** @type {WorkflowDTO} */ input) =>
asyncPipe(
init,
inject.getLastCommit,
inject.getPackage,
createNewVersion,
inject.updatePackage,
inject.commitNewVersion,
inject.tagNewVersion,
inject.pushCommit,
inject.packageArtefact,
inject.saveArtefact
)({
...input
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment