ci(release): setup git user

pull/29597/head^2
Diego Sampaio 3 years ago
parent 3e139f206e
commit 5d6a6cb127
No known key found for this signature in database
GPG Key ID: B71D302EB7F5183C
  1. 6
      packages/release-action/src/gitUtils.ts
  2. 4
      packages/release-action/src/index.ts

@ -0,0 +1,6 @@
import { exec } from '@actions/exec';
export async function setupGitUser() {
await exec('git', ['config', 'user.name', '"rocketchat-github-ci"']);
await exec('git', ['config', 'user.email', '"buildmaster@rocket.chat"']);
}

@ -6,6 +6,7 @@ import * as core from '@actions/core';
import { publishRelease } from './publishRelease';
import { bumpNextVersion } from './bumpNextVersion';
import { startPatchRelease } from './startPatchRelease';
import { setupGitUser } from './gitUtils';
// const getOptionalInput = (name: string) => core.getInput(name) || undefined;
@ -22,6 +23,9 @@ import { startPatchRelease } from './startPatchRelease';
// process.chdir(inputCwd);
// }
core.info('setting git user');
await setupGitUser();
core.info('setting GitHub credentials');
fs.writeFileSync(`${process.env.HOME}/.netrc`, `machine github.com\nlogin github-actions[bot]\npassword ${githubToken}`);

Loading…
Cancel
Save