cake-build / cake

:cake: Cake (C# Make) is a cross platform build automation system.
https://cakebuild.net
MIT License
3.89k stars 726 forks source link

GitHub support #73

Closed patriksvensson closed 3 years ago

patriksvensson commented 10 years ago

Would be nice to be able to be able to communicate with GitHub directly from the build script. For example to create a release and to upload release assets.

This obviously need some more thought.

jeffdoolittle commented 10 years ago

I'm interested in having a conversation about your specific thoughts on this feature.

patriksvensson commented 10 years ago

This one would be GitHub specific (release assets and stuff unique to github).

I could have sworn that I added an issue for generic Git support, but i must have been mistaken :/

RichiCoder1 commented 10 years ago

I was thinking about doing this, but it seems like something that wouldn't be appropriate in Cake.Common. Especially since it might bring in an extra dependency. Have you considered adding a Cake Contrib repository for additional tools that have above average depedencies?

ChrisMissal commented 9 years ago

I imagine this would use Octokit.net, yes?

patriksvensson commented 9 years ago

@ChrisMissal For creating and uploading releases, GitHub's REST API would suffice to avoid taking a dependency. I know that I'm a little bit reluctant to include third party dependencies in Cake, but it's a slippery slope :smile:

Here is an example of how this could be done: https://github.com/hadouken/hadouken/blob/develop/win32/build.cake#L280

RichiCoder1 commented 9 years ago

My intention was to use octokit. This might be the point we consider cake contrib for functionality that takes a third party dependency, but is maintained by cake.

ChrisMissal commented 9 years ago

For sure, I was thinking it would work like https://github.com/WCOMAB/Cake.Slack for example. If Cake could just expose Octokit, then script builds could do whatever they wanted.

patriksvensson commented 9 years ago

@RichiCoder1 @ChrisMissal Yes. I like the idea of maintaining official plugins seperate from the Cake package itself.

I'm not opposed to including third party libraries. libgit2sharp for example is probably something we need to take a dependency on later for Git support. I'm just being a little bit cautious.

patriksvensson commented 9 years ago

@ChrisMissal I agree. Exposing OctoKit would probably be better than writing Wrappers around everything (if I understand you correctly).

This could be done with the #addin pre-processor which would download Octokit from NuGet and add a reference to it in the project.

Would be nice though with support for creating releases and uploading artifacts out of the box.

gep13 commented 9 years ago

I was just thinking...

Would it make sense to encapsulate GitReleaseManager to do this work, rather than re-invent the wheel? We have already created, using Octokit, the ability to create a release, upload assets, close milestones, publish a release, etc.

GitReleaseManager is a standalone exe, which could easily be created as an alias in Cake.

https://gitreleasemanager.readme.io/docs/create

Just a thought :smile_cat:

RichiCoder1 commented 9 years ago

That could work if we want it built in :)

devlead commented 9 years ago

Regardless GitReleaseManager could be an excellent addin, Cake addins is a great way to extend the DSL, also makes it easy to test/release out of band and super easy to move into Cake later.

gep13 commented 8 years ago

Since GitReleaseManager Aliases have just been pulled in, I think we can go ahead and close this issue? Thoughts?

patriksvensson commented 8 years ago

I actually want wrappers around GitHubs API:s as well in the future so I think we could leave this open for now.

gep13 commented 8 years ago

No worries, just thought I would check.

patriksvensson commented 8 years ago

Great that you did :) On Oct 17, 2015 14:17, "Gary Ewan Park" notifications@github.com wrote:

No worries, just thought I would check.

— Reply to this email directly or view it on GitHub https://github.com/cake-build/cake/issues/73#issuecomment-148913008.

ChrisMaddock commented 7 years ago

I wanted the functionality to create GitHub pull requests/issues, so have thrown together an add-in to wrap Octokit and provide that. It's not pretty yet, but hopefully will become sharable at some point!

What I'm not sure about, is what other parts of the API would be worth including. The release functionality seems to be taken care of by the GitReleaseManager add-in, and I'm not sure of the value of much else in the API, for a build script.

Did you have any particular ideas of what else you thought should be included @patriksvensson? Anyone else?

pascalberger commented 3 years ago

There's now a Cake.GitHub addin available using OctoKit and which can be extended with additional features if required. There exists also a Cake.OctoDeploy addin providing some addins for working with GitHub releases.

Closing this since requests for additional features should be done to the addin repos.