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

Switch Build To Cake Frosting #8225

Closed

Conversation

AristurtleDev
Copy link
Contributor

Description

This PR switches the build system from a Cake .NET build script to a Cake Frosting .NET Project. Switching to a Cake Frosting project allows the monolithic build script to be separated into more maintainable parts for each part of the build process.

The GitHub Actions workflow was also updated to go along with this switch and has been split into two separate workflows

Name When It Runs Description
build.yml When a Pull Request is opened, reopened, or has new commits pushed to it Performs only the build tasks
build-and-deploy.yml When a push is made to the develop branch Performs the build tasks and additionally uploads all generated NuGet packages to the MonoGame GitHub packages repository

Motivation

The original motivation for this came from the discussion in Issue #8106: Update nuget.org feed with MonoGame develop builds. This is in effort to setup the process of having weekly pre-release Nugets pushed to the official NuGet source.

The motivation for this PR was also to update the automated build steps to a more modern approach that is more maintainable. Using Cake Frosting is also the build process being used for all new repositories in the MonoGame space, such as the new lib dependency repositories.

The change in the workflow was to ensure that the NuGets are only pushed when a merge happens and pushed to the develop branch, and not for every PR made and subsequent commit made to open PRs.

References:

This is an effort to prevent the number of Actions that run due to PRs being submitted.  This adjusts it so that it will only run the action on  a PR when the PR is either opened, reopened, or synchronized (aka a new commit pushed)
This will be added to a new workflow later
Switching from cake build to cake frosting, restoring tools is no longer needed.
These are used to upload artifacts from the cake frosting task
This will only execute when a push has occurred to the develop branch.  This will build and deploy the NuGets to the GitHub Nuget repository.
Remove old cake build stuff in favor of new cake frosting project
@mrhelmut mrhelmut requested a review from harry-cpp March 12, 2024 08:25
@harry-cpp
Copy link
Member

I see quite a few things that need improving, I'll see if I can push em directly to this PR instead of writing em all down 😄

@AristurtleDev
Copy link
Contributor Author

I see quite a few things that need improving, I'll see if I can push em directly to this PR instead of writing em all down 😄

You should be able to, if it doesn't let you, let me know and I can check the fork settings

@harry-cpp
Copy link
Member

harry-cpp commented Mar 13, 2024

Superseded by #8234

@harry-cpp harry-cpp closed this Mar 13, 2024
@AristurtleDev AristurtleDev deleted the feature/cake-frosting-build branch May 9, 2024 21:52
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.

None yet

2 participants