Skip to content

Commit 54eb11c

Browse files
committed
docs: channel branches in release workflow + promotion-PR check behavior
- Release workflow examples: comment that channel branches go in the push trigger too, and switch the concurrency group to per-ref so a channel publish doesn't queue behind / get cancelled by a main release (the lesson from dogfooding the next channel). - Concurrency section: explain the per-ref group and when it matters. - prereleases.md setup: note existing single-group workflows need the per-ref change. - cli.md: document what 'ci check' shows on channel and promotion PRs.
1 parent 60e1f7a commit 54eb11c

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

docs/cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ bumpy ci check --no-fail
190190

191191
Requires `GH_TOKEN` environment variable (automatically available in GitHub Actions).
192192

193+
**On channel and promotion PRs:** for a PR targeting a [prerelease channel](prereleases.md) branch, the comment is channel-aware — it shows the prerelease plan (`-<preid>.x` versions) and the target dist-tag rather than implying a stable release. For a **promotion PR** (a channel branch → `main`, or a graduation like `alpha``beta`), the check reads the cycle's already-shipped bump files from `.bumpy/<channel>/` and shows the consolidated stable plan, calling out that merging ends the prerelease cycle. (Feature PRs that _target_ a channel branch are checked against that branch, so only the PR's own new bump files count — see [`--base`](#bumpy-check) on the local `check` command for the equivalent locally.)
194+
193195
## `bumpy ci plan`
194196

195197
CI command that reports what `ci release` would do, without acting. Outputs JSON to stdout and sets GitHub Actions step outputs so you can conditionally run expensive steps (builds, etc.) only when needed.

docs/github-actions.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,15 @@ The recommended release workflow splits version-PR maintenance from publishing i
108108
name: Bumpy Release
109109
on:
110110
push:
111+
# Add any prerelease channel branches here too, e.g. [main, next, beta].
112+
# See the prerelease channels docs: https://github.com/dmno-dev/bumpy/blob/main/docs/prereleases.md
111113
branches: [main]
112114
113115
concurrency:
114-
group: bumpy-release
116+
# Per-branch so a channel (e.g. next) publish doesn't queue behind — or get
117+
# cancelled by — a main release. Drop the `-${{ github.ref }}` if you never
118+
# add channel branches above.
119+
group: bumpy-release-${{ github.ref }}
115120
cancel-in-progress: false
116121

117122
jobs:
@@ -257,10 +262,15 @@ For simpler setups, you can run everything in a single job. `bumpy ci release` w
257262
name: Bumpy Release
258263
on:
259264
push:
265+
# Add any prerelease channel branches here too, e.g. [main, next, beta].
266+
# See the prerelease channels docs: https://github.com/dmno-dev/bumpy/blob/main/docs/prereleases.md
260267
branches: [main]
261268
262269
concurrency:
263-
group: bumpy-release
270+
# Per-branch so a channel (e.g. next) publish doesn't queue behind — or get
271+
# cancelled by — a main release. Drop the `-${{ github.ref }}` if you never
272+
# add channel branches above.
273+
group: bumpy-release-${{ github.ref }}
264274
cancel-in-progress: false
265275

266276
jobs:
@@ -321,12 +331,16 @@ Use a concurrency group on your release workflow to prevent overlapping publish
321331

322332
```yaml
323333
concurrency:
324-
group: bumpy-release
334+
# Per-ref: serialize runs within a branch, but let different branches run in
335+
# parallel. Drop the `-${{ github.ref }}` if you only ever release from main.
336+
group: bumpy-release-${{ github.ref }}
325337
cancel-in-progress: false # queue rather than cancel — don't skip releases
326338
```
327339
328340
This is included in all the workflow examples above.
329341
342+
The `-${{ github.ref }}` matters once you add [prerelease channels](prereleases.md): a single shared group (`bumpy-release`) would make a `next` prerelease publish queue behind — or, with `cancel-in-progress: true`, get cancelled by — a `main` release, even though they touch different dist-tags and never conflict. Per-ref keeps each branch's releases serialized against themselves while letting `main` and `next` proceed independently. If you release only from `main`, the plain `bumpy-release` group is equivalent.
343+
330344
## Token setup
331345

332346
### `GH_TOKEN` (required)

docs/prereleases.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ on:
135135
branches: [main, next] # add channel branches here
136136
```
137137
138-
That's the only workflow change. `bumpy ci release` reads the current branch, looks up the channel in `_config.json`, and behaves accordingly.
138+
That's the only trigger change. `bumpy ci release` reads the current branch, looks up the channel in `_config.json`, and behaves accordingly.
139+
140+
> **Concurrency:** if your workflow uses a single `concurrency.group` (e.g. `bumpy-release`), make it per-ref (`bumpy-release-${{ github.ref }}`) so a channel publish doesn't queue behind — or get cancelled by — a `main` release. The [recommended release workflow](github-actions.md#release-workflow-recommended-split-jobs) already does this.
139141

140142
> **If your publish job runs in a GitHub Environment with deployment branch restrictions** (the [recommended hardening](github-actions.md#optional-hardening-protection-rules-on-the-publish-environment) restricts it to `main`), add each channel branch to the environment's allowed deployment branches (repo Settings → Environments → publish → Deployment branches). Otherwise the publish job can't run from the channel branch — with npm trusted publishing this means OIDC token requests are rejected and channel publishes fail.
141143

0 commit comments

Comments
 (0)