import pipeline from "./pipeline";
import options from "./options";
import generateChangelog from "./steps/generate-changelog";
import publishChangelog from "./steps/publish-changelog";

export default async function post(opts={}) {
	opts = await options(opts);
	let steps = opts.post || {};

	if (!Array.isArray(steps)) steps = [
		opts.generateChangelog || generateChangelog,
		opts.publishChangelog || publishChangelog
	];

	await pipeline(steps, opts);
}

@@ -326,19 +326,20 @@
 s = %5B%0A%09%09
-opt
+step
 s.genera
@@ -374,19 +374,20 @@
 elog,%0A%09%09
-opt
+step
 s.publis

fix (post): use steps from config