Skip to content

Commit 7fb5e37

Browse files
committed
ci(release-plz): the eql-bindings publish does not run after a cancelled release
`always()` started the job after somebody cancelled the run, and a crates.io upload cannot be undone, only yanked. `!cancelled()` keeps the one property the condition was there for: the job still runs when `release-crates` is skipped because no stack-* crate moved. Same rule as the publishing jobs in release.yml.
1 parent d4a006b commit 7fb5e37

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎.github/workflows/release-plz.yml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,16 @@ jobs:
9191
# from crates.io, so on a push that releases both, publishing in parallel
9292
# races this job's resolution against the other job's upload. Ordered,
9393
# the stack-* crates land first and this job's verify finds them.
94-
# `always()` because `release-crates` is skipped on every push that moves
95-
# no stack-* crate, and a skipped dependency would otherwise skip this job
96-
# too; its FAILURE still stops this one, since the crates it needed did
97-
# not publish.
94+
# `!cancelled()`, not the implicit `success()`: `release-crates` is
95+
# skipped on every push that moves no stack-* crate, and a skipped
96+
# dependency would otherwise skip this job too. Not `always()` either:
97+
# that would start this job after somebody cancelled the run, and a
98+
# crates.io upload cannot be undone, only yanked (see the same rule on
99+
# the publishing jobs in release.yml). A FAILURE of `release-crates`
100+
# still stops this one, since the crates it needed did not publish.
98101
needs: [eql-armed, release-crates]
99102
if: >-
100-
always()
103+
!cancelled()
101104
&& needs.eql-armed.outputs.armed == 'true'
102105
&& (needs.release-crates.result == 'success' || needs.release-crates.result == 'skipped')
103106
# GitHub-hosted, matching this repo's other publishing jobs.

0 commit comments

Comments
 (0)