ci: add concurrency groups to CI and the release workflows (#35)
CI cancels the run in flight when a newer push lands on the same ref. release-github and release-mcp-registry queue per tag and never cancel, so a second dispatch for the same tag waits instead of racing the first. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Seto Elkahfi committed
Oct 12, 2026 at 01:32 UTC
5f03e96c0a9e6b9d53f7edc14e8fbcd8df820056
3 files changed
+18
.github/workflows/ci.yml
+6
@@ -6,6 +6,12 @@ name: Tests
6
# many).
7
on: push
8
9
+# A newer push to the same ref supersedes the run in flight, so a burst of
10
+# pushes to a branch doesn't queue a full ubuntu + macOS matrix for each one.
11
+concurrency:
12
+ group: ci-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
env:
16
CARGO_TERM_COLOR: always
17
.github/workflows/release-github.yml
+6
@@ -7,6 +7,12 @@ on:
7
description: "Release tag (e.g. v0.2.0)"
8
required: true
9
10
+# One release per tag at a time, and never cancelled: a half-built release
11
+# has to finish or fail on its own. A second dispatch for the same tag waits.
12
+concurrency:
13
+ group: release-github-${{ github.event.inputs.tag || github.ref }}
14
+ cancel-in-progress: false
15
+
16
permissions:
17
contents: write
18
.github/workflows/release-mcp-registry.yml
+6
@@ -7,6 +7,12 @@ on:
7
description: "Release tag (e.g. v0.1.0)"
8
required: true
9
10
+# One registry publish per tag at a time, and never cancelled: cancelling
11
+# `mcp-publisher` mid-publish could leave the listing half-updated.
12
+concurrency:
13
+ group: release-mcp-registry-${{ github.event.inputs.tag || github.ref }}
14
+ cancel-in-progress: false
15
+
16
# OIDC is how we authenticate to the MCP Registry: the registry trusts a GitHub
17
# Actions token issued for this repository, so no long-lived secret is needed.
18
permissions: