diff --git a/.github/workflows/purview-release.yml b/.github/workflows/purview-release.yml index bb44b35..d11878b 100644 --- a/.github/workflows/purview-release.yml +++ b/.github/workflows/purview-release.yml @@ -21,7 +21,8 @@ on: type: string release-branch: description: >- - Branch that triggers this release (main or release). Used only for the concurrency group. + Branch that triggers this release (main or release). Retained for backward compatibility; + callers now control release serialization via their own concurrency group. required: false default: main type: string @@ -67,10 +68,6 @@ permissions: contents: write packages: read -concurrency: - group: purview-release-${{ inputs.release-branch }} - cancel-in-progress: false - jobs: release: name: Release diff --git a/README.md b/README.md index 2e21520..bc89469 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ name: Release on: push: branches: [main] +concurrency: + # Serialize releases; callers own concurrency (see docs/releasing.md). + group: release-${{ github.ref }} + cancel-in-progress: false jobs: release: uses: purview-dev/build/.github/workflows/purview-release.yml@main diff --git a/docs/releasing.md b/docs/releasing.md index efe03b5..907b895 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -19,6 +19,16 @@ Each repository is gated by a pull-request build. Two release trigger models are In both models the reusable `purview-release.yml` workflow reads `package.json`'s `version`, skips when the `v{version}` tag already exists, and otherwise runs the pipeline with `Release__Mode` set. Because publication is idempotent (`--skip-duplicate`) and the tag is created by the workflow, re-merging `main` into `release` after a failed release is safe. +The reusable workflow does **not** define a concurrency group. GitHub Actions cancels a run as a deadlock when a caller workflow and the reusable workflow it calls share the same concurrency group (the caller's `purview-release-main` collided with the reusable workflow's `purview-release-${{ inputs.release-branch }}` resolving to the same value, producing *"Canceling since a deadlock was detected for concurrency group"*). Callers must own release serialization by defining their own `concurrency` block: + +```yaml +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: false +``` + +The `release-branch` input is retained for backward compatibility only. + ## This repository's CI/CD This repository dogfoods the shared tool. CI performs locked restore, warnings-as-errors compilation, packing, installation from the generated package, then runs `purview-build` against this repository so the project builds and packs itself.