mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
v2.0.0-next.0
This commit is contained in:
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{c as e,d as t,u as n}from"./github-B-FmP-qI.js";import{n as r,t as i,u as a}from"./utils-CZUacPOo.js";import o from"node:fs/promises";import s from"node:path";import c from"node:os";try{await l()}catch(e){n(e.message)}async function l(){let n=e(`publish-plan-artifact-id`),r=process.cwd(),i=process.env.RUNNER_TEMP??await o.realpath(c.tmpdir()),l=s.join(i,`changeset-pack-${Date.now()}`);await u(r,{outDir:l,publishPlanPath:n?await d(i,Number(n)):void 0});let p=await a.uploadArtifact(`changeset-pack-${Date.now()}`,await f(l),l,{retentionDays:30});if(p.id===void 0)throw Error(`Packed artifact upload did not return an artifact id`);t(`pack-dir-artifact-id`,String(p.id))}async function u(e,t){let n=[`pack`,`--out-dir`,t.outDir];t.publishPlanPath&&n.push(`--from-plan`,t.publishPlanPath),await r(n,{cwd:e,env:process.env})}async function d(e,t){let n=await i(e,t,`changeset-publish-plan`);return s.join(n,`publish-plan.json`)}async function f(e){let t=await o.readdir(e,{withFileTypes:!0});return(await Promise.all(t.map(async t=>{let n=s.join(e,t.name);return t.isDirectory()?f(n):[n]}))).flat()}export{};
|
||||
Reference in New Issue
Block a user