Skip to content
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
7 changes: 2 additions & 5 deletions .github/workflows/purview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -67,10 +68,6 @@ permissions:
contents: write
packages: read

concurrency:
group: purview-release-${{ inputs.release-branch }}
cancel-in-progress: false

jobs:
release:
name: Release
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down