From 235a4a4e098dfbe3f75857e2b462bef2709d6761 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 27 Jul 2025 22:16:23 -0700 Subject: Adds ci --- .ci/ci.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .ci/ci.ts (limited to '.ci/ci.ts') diff --git a/.ci/ci.ts b/.ci/ci.ts new file mode 100644 index 0000000..7c95e77 --- /dev/null +++ b/.ci/ci.ts @@ -0,0 +1,27 @@ +#!/usr/bin/env node + +import { DefaultGitHookPipelineBuilder, NpmPublishJob } from '@emprespresso/ci_model'; + +const getPipeline = () => { + const gitHookPipeline = new DefaultGitHookPipelineBuilder(); + const branch = gitHookPipeline.getBranch(); + if (!branch || branch !== 'release') return gitHookPipeline.build(); + + const publish: NpmPublishJob = { + type: 'npm_publish.js', + arguments: { + source: '.', + registry: '//registry.npmjs.org/', + }, + }; + gitHookPipeline.addStage({ parallelJobs: [publish] }); + + return gitHookPipeline.build(); +}; + +const main = () => { + const data = getPipeline().serialize(); + process.stdout.write(data); +}; + +main(); -- cgit v1.2.3-70-g09d2