import{_ as e,m as t,v as n}from"./get-packages.cjs-Dvdg-NAr.js";import{i as r,r as i,t as a}from"./run-CRWwTmP3.js";import{c as o,s,t as c}from"./utils-DQTbg3yF.js";import l from"node:fs/promises";import u from"node:os";try{await d()}catch(t){e(t.message)}async function d(){let e=o(`github-token`),d=s(`script`),f=s(`pack-dir-artifact-id`),p=t(`create-github-releases`),m=process.cwd(),h=i(e),g=await a({script:d,githubToken:e,git:new r({octokit:h,cwd:m}),octokit:h,createGithubReleases:p,cwd:m,fromPackDir:f?await c(process.env.RUNNER_TEMP??await l.realpath(u.tmpdir()),Number(f),`changeset-pack`):void 0});if(g.published?(n(`published`,`true`),n(`published-packages`,JSON.stringify(g.publishedPackages))):n(`published`,`false`),g.exitCode!==0)throw Error(`Publish command exited with code ${g.exitCode}${g.published?`, but some packages were published: ${g.publishedPackages.map(e=>`${e.name}@${e.version}`).join(`, `)}`:``}`)}export{};