Skip to content

Commit

Permalink
feat: add concurrency to release workflow (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongaar committed May 9, 2023
1 parent a4c1300 commit f8f4145
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:

jobs:
release:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/commands/reinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import { format, updateDependencies } from "../tasks.js";
export const reinstall = command("reinstall")
.hidden()
.description("Reinstalls all plugins in the current directory")
.option("all", {
.option("recursive", {
type: "boolean",
description: "Also reinstalls plugins of all workspaces in a monorepo",
})
.option("cwd", {
description: "Directory to use as the current working directory",
default: process.cwd(),
})
.action(async ({ all, cwd }) => {
.action(async ({ recursive, cwd }) => {
const directory = resolve(cwd);
const plugins = await getPlugins({ directory });

Expand All @@ -35,7 +35,7 @@ export const reinstall = command("reinstall")

await task(`Load plugins`, () => loadAllPlugins({ directory }));

if (all && (await isMonorepo({ directory }))) {
if (recursive && (await isMonorepo({ directory }))) {
const workspaces = await getWorkspaces({ directory });

for (const workspace of workspaces) {
Expand Down
3 changes: 3 additions & 0 deletions packages/plugins/static/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:

jobs:
release:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit f8f4145

Please sign in to comment.