Skip to content

Commit 2559b1c

Browse files
committed
fix(ci): stop a half-shipped release from passing as a good one
`publish-native-assets` correctly refuses to publish a partial native set, but a job whose dependency failed reports `skipped`, not `failure`. `redeploy-cdn` only checked for `failure`, so it deployed 1.0.0 to the CDN while the GitHub release held zero assets — every native installer would have been pointed at a release that has none. It now requires that job to have succeeded whenever the release has native artifacts at all, leaving the CDN on the last installable version otherwise. `verify-cdn-release` had no `always()`, so the same upstream skip propagated through the graph and silently disabled the one gate that exists to catch a half-shipped release. It now runs on its own merits and reports the stale CDN instead of vanishing with it.
1 parent d766fda commit 2559b1c

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,18 @@ jobs:
240240
needs:
241241
- release
242242
- publish-native-assets
243+
# A native release whose zips never reached the GitHub release must not
244+
# reach the CDN either. `publish-native-assets` refuses to publish a
245+
# partial set, and a job whose needs failed reports `skipped`, not
246+
# `failure` — so checking only for failure let a release with zero assets
247+
# through and pointed every native installer at a release that has none.
248+
# Requiring success (only when this release has native artifacts at all)
249+
# leaves the CDN on the last installable version instead.
243250
if: >-
244251
always()
245252
&& needs.release.result == 'success'
246-
&& needs.publish-native-assets.result != 'failure'
247-
&& needs.publish-native-assets.result != 'cancelled'
253+
&& (needs.release.outputs.pythinker_native_release != 'true'
254+
|| needs.publish-native-assets.result == 'success')
248255
&& (needs.release.outputs.packages_published == 'true'
249256
|| startsWith(github.event.head_commit.message, 'ci: release packages'))
250257
runs-on: ubuntu-latest
@@ -308,9 +315,16 @@ jobs:
308315
needs:
309316
- release
310317
- redeploy-cdn
318+
# Without `always()` a skip anywhere upstream skips this job too, and the
319+
# gate that exists to catch a half-shipped release goes quiet in exactly
320+
# the runs that need it. It stays out of `redeploy-cdn`'s result on
321+
# purpose: a CDN that never redeployed is the failure this asserts, so it
322+
# has to run and report it rather than disappear with it.
311323
if: >-
312-
needs.release.outputs.packages_published == 'true'
313-
|| startsWith(github.event.head_commit.message, 'ci: release packages')
324+
always()
325+
&& needs.release.result == 'success'
326+
&& (needs.release.outputs.packages_published == 'true'
327+
|| startsWith(github.event.head_commit.message, 'ci: release packages'))
314328
runs-on: ubuntu-latest
315329
steps:
316330
- name: Checkout

0 commit comments

Comments
 (0)