forked from heavy-duty/box
fix: a -dev endstate is always work — the post-release bump must not run red
The four-state table called '-dev but changed' half a ceremony and refused — but that state IS the mandatory post-release bump PR (bare -> X.Y.(Z+1)-dev after every release), which would have put a red run on main once per release, forever. A tree that ends -dev is by definition not a release: every such merge is work, and no-ops green with a NOTICE. The red verdicts now guard only bare endstates. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
420e8e7f32
commit
13aa499dad
2 changed files with 9 additions and 6 deletions
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
|
|
@ -63,8 +63,10 @@ jobs:
|
||||||
# job included. The version tells them apart, in four states:
|
# job included. The version tells them apart, in four states:
|
||||||
# -dev, unchanged → work under the label: green NOTICE
|
# -dev, unchanged → work under the label: green NOTICE
|
||||||
# no-op, not a red run per infra PR
|
# no-op, not a red run per infra PR
|
||||||
# -dev, changed → a bump that forgot to leave -dev:
|
# -dev, changed → still a dev tree, so still work —
|
||||||
# half a ceremony, refuse
|
# the post-release bump PR above all
|
||||||
|
# (bare -> -dev after every release):
|
||||||
|
# green NOTICE no-op
|
||||||
# bare, unchanged, released → work merged in the post-release
|
# bare, unchanged, released → work merged in the post-release
|
||||||
# window (ceremony landed, the -dev
|
# window (ceremony landed, the -dev
|
||||||
# bump has not): green NOTICE no-op
|
# bump has not): green NOTICE no-op
|
||||||
|
|
@ -85,8 +87,9 @@ jobs:
|
||||||
echo "ceremony=no" >> "$GITHUB_OUTPUT"
|
echo "ceremony=no" >> "$GITHUB_OUTPUT"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo "VERSION changed ('$base' -> '$ver') but is still -dev — half a ceremony; a release PR ships a bare X.Y.Z — creating nothing." >&2
|
echo "NOTICE: VERSION changed ('$base' -> '$ver') and still ends -dev — a dev tree is by definition not a release. This is work (the post-release bump, a renumber); nothing to publish."
|
||||||
exit 1 ;;
|
echo "ceremony=no" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0 ;;
|
||||||
esac
|
esac
|
||||||
if [ "$base" = "$ver" ]; then
|
if [ "$base" = "$ver" ]; then
|
||||||
if gh release view "$ver" --json name >/dev/null 2>&1; then
|
if gh release view "$ver" --json name >/dev/null 2>&1; then
|
||||||
|
|
|
||||||
|
|
@ -158,8 +158,8 @@ check "release.yml: tag + publish share one job (the anti-recursion shape)" 0 ""
|
||||||
# and the gating output.
|
# and the gating output.
|
||||||
check "release.yml: decide — dev-tree work no-ops green (not a red run per infra PR)" 0 "" \
|
check "release.yml: decide — dev-tree work no-ops green (not a red run per infra PR)" 0 "" \
|
||||||
grep -qF "release-flow work under the release label, not a ceremony" "$RY"
|
grep -qF "release-flow work under the release label, not a ceremony" "$RY"
|
||||||
check "release.yml: decide — a half-ceremony (-dev but changed) refuses" 0 "" \
|
check "release.yml: decide — a -dev endstate is always work (the bump PR no-ops green)" 0 "" \
|
||||||
grep -qF "half a ceremony" "$RY"
|
grep -qF "a dev tree is by definition not a release" "$RY"
|
||||||
check "release.yml: decide — post-release-window work no-ops green" 0 "" \
|
check "release.yml: decide — post-release-window work no-ops green" 0 "" \
|
||||||
grep -qF "release-flow work merged in the post-release window" "$RY"
|
grep -qF "release-flow work merged in the post-release window" "$RY"
|
||||||
check "release.yml: decide — bare, unchanged, never released refuses to guess" 0 "" \
|
check "release.yml: decide — bare, unchanged, never released refuses to guess" 0 "" \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue