ci: skip publish step if no release is needed#2894
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2894 +/- ##
=======================================
Coverage 93.59% 93.59%
=======================================
Files 44 44
Lines 7855 7855
Branches 687 687
=======================================
Hits 7352 7352
Misses 498 498
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WilliamBergamin
left a comment
There was a problem hiding this comment.
Nice find 💯
Left a non blocking comment
| name: Publish | ||
| needs: changelog | ||
| if: needs.changelog.outputs.hasChangesets == 'false' | ||
| if: needs.changelog.outputs.hasChangesets == 'false' && needs.changelog.outputs.releaseExists != 'true' |
There was a problem hiding this comment.
Is there a reason we don't want to check for == 'false' instead?
| if: needs.changelog.outputs.hasChangesets == 'false' && needs.changelog.outputs.releaseExists != 'true' | |
| if: needs.changelog.outputs.hasChangesets == 'false' && needs.changelog.outputs.releaseExists != 'false' |
There was a problem hiding this comment.
@WilliamBergamin Earlier iterations might've left odd patterns here! We landed a92b061 to continue if no release exists now with a false check 🏁
Co-authored-by: William Bergamin <wbergamin@slack-corp.com>
|
@WilliamBergamin I appreciate the review toward more sensible logic 🧠 ✨ Let's merge this now and mirror this in adjacent projects to avoid required approvals for attempted releases before changes land 🚀 |

Summary
This PR skips the
publishstep if no release is needed 🚀Fixes an issue where publishing is attempted after a recent release but no changsets exist. The "changelog" PR wasn't created so publishing was attempted! This didn't cause problems but requires unneeded approval.
Requirements