Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Build releases in dependency order. #563

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Sep 3, 2024

This contains several conditions that appear to be illogical, but are required by github actions. For some background this issue can be read:
actions/runner#491

always():

Imagine two packages. Package "a" and package "b".

"b" depends on "a" and we want to automatically release "a" and "b" using release please. We make "b" needs "a", so that "b" will build after "a". But if we do that, then "b" will not build unless "a" also builds. We often need to release "b" even though there are no changes to "a".

By using if: always() we can cause "b" to run after "a" even when "a" doesn't run.

failure() and canceled().

With always() package "b" will be built and released even if package "a" failed to build. You would expect that to only require failure(), but it seems that it only works if you have canceled() as well. (It may be we don't actually need failure.)

We want the build order to be like this.
dep-order-2 drawio

@kinyoklion kinyoklion marked this pull request as ready for review September 3, 2024 21:02
@kinyoklion kinyoklion requested a review from a team as a code owner September 3, 2024 21:02
@@ -339,7 +339,7 @@ jobs:

release-tooling-react-universal:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This build is disabled. I didn't update the condition, but will add it to the condition comment.

Copy link
Member

@keelerm84 keelerm84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you.

@kinyoklion kinyoklion merged commit 6895509 into main Sep 3, 2024
22 checks passed
@kinyoklion kinyoklion deleted the rlamb/sc-255106/build-safety branch September 3, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants