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
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@ on:
permissions:
contents: read

# One release at a time; never cancel one half-way through publishing.
# One run per commit at a time, and never cancel one half-way through
# publishing. Not one shared group: GitHub keeps only one *waiting* run per
# group, so a release waiting for its PyPI approval made the next merged
# version's run replace (cancel) any run already queued behind it. That is how
# the 0.14.0 run was lost on 2026-12-05. Different versions run independently;
# the release job marks "Latest" by version, not by finishing order.
concurrency:
group: release
group: release-${{ inputs.ref || github.event.release.tag_name || github.sha }}
cancel-in-progress: false

jobs:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht

## [Unreleased]

### Fixed

- Release automation: a release waiting for its PyPI approval no longer
causes the next merged version's run to cancel a run queued behind it
(runs now queue per commit instead of in one shared group). This is how the
0.14.0 release run was lost.

## [0.15.0] - 2026-12-06

### Changed
Expand Down
10 changes: 10 additions & 0 deletions tests/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ def test_default_token_is_read_only(workflow):
assert _load(workflow).get("permissions") == {"contents": "read"}


def test_release_runs_queue_per_commit_not_in_one_shared_group():
"""GitHub keeps one waiting run per concurrency group: with a single
"release" group, a second merged version cancelled the run queued
behind a release that was waiting for PyPI approval."""
conc = _load("release.yml")["concurrency"]
assert conc["cancel-in-progress"] is False
group = conc["group"]
assert "${{" in group and "github.sha" in group and "inputs.ref" in group


def test_publish_jobs_keep_only_the_oidc_permission():
jobs = _load("release.yml")["jobs"]
for name in ("publish-testpypi", "publish-pypi"):
Expand Down