Skip to content

Commit

Permalink
Try with gh CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Oct 3, 2023
1 parent 4525fe0 commit 0216ebc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/publish-action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ 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 "${process.env.GH_TOKEN}@github.com:${repo}.git"`);
await run(`git remote add origin "git@github.com:${repo}.git"`);
await run('git add .');
await run(`git commit -m "${newVersion}"`);
await run('git tag v1');
await run('git push origin HEAD:main --force');
await run('git push --tags --force');
await run(`gh auth login --with-token ${process.env.GH_TOKEN}`);
await run('gh repo sync --force');

return cleanup();
};
Expand Down

0 comments on commit 0216ebc

Please sign in to comment.