Skip to content

Commit

Permalink
Use GH_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Oct 2, 2023
1 parent 95fb8b3 commit 03662bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/publish-action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const command = (cmd, opts) => execaCommand(cmd, { stdio: 'inherit', ...opts });

const publishAction = async ({ context, newVersion, repo }) => {
console.info(`✅ Publishing '${context}' action to https://github.com/${repo}`);
console.log(process.env.GH_TOKEN?.slice(0, 4) + '...');

const { path, cleanup } = await tmp.dir({ unsafeCleanup: true, prefix: `chromatic-action-` });
const run = (cmd) => command(cmd, { cwd: path });
Expand All @@ -20,7 +21,7 @@ const publishAction = async ({ context, newVersion, repo }) => {
await run('git init -b main');
await run('git config --global user.name "Chromatic"');
await run('git config --global user.email "support@chromatic.com"');
await run(`git remote add origin git@github.com:${repo}.git`);
await run(`git remote add origin ${process.env.GH_TOKEN}@github.com:${repo}.git`);
await run('git add .');
await run(`git commit -m ${newVersion}`);
await run('git tag v1');
Expand Down

0 comments on commit 03662bd

Please sign in to comment.