Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Release to GH and add generated files to release #843

Open
magx2 opened this issue Aug 22, 2019 · 8 comments
Open

Release to GH and add generated files to release #843

magx2 opened this issue Aug 22, 2019 · 8 comments

Comments

@magx2
Copy link

magx2 commented Aug 22, 2019

I'm interested in feature that allows to add files to GH releases, i.e. this release has attached source code (zip and tar), but if you, as a owner of this repo, can click Edit and attach some generic files.

What is the use case? Right now I'm working on Java GUI and all my released version (all two) are on release page. Why I'm not using Bintray/Maven? Because it's looking nicer and user of my app do not need to leave GH to download it - I see it as more user friendly.

So now let's jump to code. I think this feature should look more or less like this:

shipkit {
    gitHub.repository = "wwilk/shipkit-demo"
    gitHub.readOnlyAuthToken = "e7fe8fcfd6ffedac384c8c4c71b2a48e646"
    gitHub.releaseFiles = [
        "${buildDir}/foo/boo.xyz",
        "${buildDir}/foo/baz.abc",
    ]
}

This code will add both files into newly created release on GH.

Looking forward to hear from you guys!

@magx2
Copy link
Author

magx2 commented Aug 22, 2019

@magx2
Copy link
Author

magx2 commented Aug 22, 2019

Gradle plugin that might be helpful https://github.com/BreadMoirai/github-release-gradle-plugin

@mstachniuk
Copy link
Contributor

@magx2 Maybe you can try to use github-release-gradle-plugin with shipkit?

@magx2
Copy link
Author

magx2 commented Aug 23, 2019

Yeah I also started thinking about it, but it would be nice to have this functionality in shipkit natively.

@mstachniuk
Copy link
Contributor

I tryied github-release-gradle-plugin. The problem is that this plugin creates release description and uploads files in one task githubRelease so it will override changelog generated by Shipkit. So it will be nice to add a possibility to upload artefacts by Shipkit.

@magx2 do you like to create PR to Shipkit for that? I can help you.

@magx2
Copy link
Author

magx2 commented Aug 28, 2019

Sorry but right now I'm fully involved in Supla project

@aepfli
Copy link

aepfli commented Mar 30, 2020

that looks like a fun task to at least try, and as we do have somewhat limitations of staying at home, i will try to do this. if somebody is faster than me, please go ahead

@aepfli
Copy link

aepfli commented Mar 31, 2020

Okay i just share my thoughts here, before i start implementing something. just let me know, if i am on the right path or if i should rethink my approach:

  1. the suggestion in here looks pretty straight forward
  2. but i also thought about it, and it would be actually nice to use the outcome of the BinTrayUpload also for the release on github, but i am not sure how to tackle this

regarding 1.
i found org.shipkit.internal.gradle.notes.tasks.UpdateReleaseNotesOnGitHub which actually sets the release notes, and is already doing the right call to the github api. I would simply go for an addition here. As i do need the ID of the release anyways to update it with Asset Upload API. What are your thoughts on that?

The downside i see from this, is that everyone still needs to define the artifacts, while actually the bintray task already has a list of those. so we come to Point 2. The mighty less configuration approach, which will definitly take more effort. If we decide on that approach, i would suggest to open a separate issue and still go with the 1. approach in the beginning, and than with some introduction from your side, aim for the 2. solution.

I hope it is fine, that i am taking some time with this, and please let me know, if my approach 1 is fine, or if you suggest to extract it further.

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants