Commit c080619
Fix skipped post-publish jobs in release mode (#57479)
Summary:
During the 0.87.0-rc.0 release, the npm packages published successfully (`publish_react_native` ✓) but every release-only downstream job was **skipped**: `post_publish`, `generate_changelog`, `bump_podfile_lock`, and `create_draft_release`. As a result the community template was not published, rn-diff-purge was not triggered, npm/Maven verification did not run, the changelog was not generated, `Podfile.lock` was not bumped, and no draft GitHub release was created.
### Root cause
These four jobs gate on a bare condition:
```yaml
if: needs.determine_mode.outputs.mode == 'release'
```
Because that expression contains no status-check function, GitHub Actions implicitly ANDs a `success()` gate. `success()` evaluates to false when there is a **skipped job in the dependency graph**. In release mode, `build_android` (a dependency of `publish_react_native`) is always skipped, which poisons the implicit `success()` for these downstream jobs — so they skip even after a fully successful publish.
`publish_react_native` already works around exactly this with `always()` + explicit `.result == 'success'` checks (see its existing `if:` and comment). This PR applies the same, proven pattern to the four downstream jobs.
### Fix
Replace each bare `if:` with `always()` plus explicit result checks so the jobs run whenever the release publish actually succeeds, and only in release mode:
```yaml
if: |
always() &&
needs.determine_mode.result == 'success' &&
needs.publish_react_native.result == 'success' &&
needs.determine_mode.outputs.mode == 'release'
```
(`create_draft_release` checks `generate_changelog` and `set_hermes_version` instead, matching its `needs`.)
## Changelog:
[Internal] -
### Notes
- This bug is structural — it affects **every** release, not just rc.0, since `build_android` is always skipped in release mode.
- A companion PR backports this fix to `0.87-stable`.
Pull Request resolved: #57479
Test Plan:
- `if` expressions unchanged in intent: run only for a successful release publish, skip for nightly/bumped-packages.
- YAML validated locally.
- Verify on the next release that `post_publish`, `generate_changelog`, `bump_podfile_lock`, and `create_draft_release` all run after `publish_react_native` succeeds.
Reviewed By: cortinico
Differential Revision: D111035339
Pulled By: cipolleschi
fbshipit-source-id: ce26ef974909af85087dcba263430e5e3ec7b9901 parent ba71ce8 commit c080619
1 file changed
Lines changed: 31 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
205 | 213 | | |
206 | 214 | | |
207 | 215 | | |
| |||
256 | 264 | | |
257 | 265 | | |
258 | 266 | | |
259 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
260 | 274 | | |
261 | 275 | | |
262 | 276 | | |
263 | 277 | | |
264 | 278 | | |
265 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
266 | 286 | | |
267 | 287 | | |
268 | 288 | | |
269 | 289 | | |
270 | 290 | | |
271 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
272 | 299 | | |
273 | 300 | | |
274 | 301 | | |
| |||
0 commit comments