Skip to content

Commit

Permalink
Added GitHub Actions support to CI detection (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored and Noviny committed Jan 24, 2020
1 parent 4af2a78 commit cc64ad5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-cameras-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@changesets/cli": patch
---

Added GitHub Actions support to CI detection.
3 changes: 1 addition & 2 deletions packages/cli/src/commands/publish/npm-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import pLimit from "p-limit";
import chalk from "chalk";
import spawn from "spawndamnit";
import { askQuestion } from "../../utils/cli-utilities";
// @ts-ignore
import isCI from "is-ci";
import isCI from "../../utils/isCI";
import { TwoFactorState } from "../../utils/types";

const npmRequestLimit = pLimit(40);
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/src/commands/publish/publishPackages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import * as npmUtils from "./npm-utils";
import { info, warn } from "@changesets/logger";
import { TwoFactorState } from "../../utils/types";
import { PreState } from "@changesets/types";
// @ts-ignore
import isCI from "is-ci";
import isCI from "../../utils/isCI";

export default async function publishPackages({
cwd,
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/utils/isCI.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// @ts-ignore
import isCI from "is-ci";

export default !!(isCI || process.env.GITHUB_ACTIONS);

0 comments on commit cc64ad5

Please sign in to comment.