Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add concurrency to release workflow #170

Merged
merged 1 commit into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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