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

Feature Request: allow updating a published version to allow multi-platform releases #321

Open
renatoathaydes opened this issue Apr 27, 2020 · 3 comments

Comments

@renatoathaydes
Copy link

I have been trying to setup an auto-updating app which a user can download, then the app itself downloads new updates as they become available.

The app is a Java app, but it's distributed as a native application.

I tried using GitHub Releases for that but it is difficult to make it work on v4 of the API as they require authentication (which users of my app can't do, it's not focussed on developers) and v3 requires multiple calls and lots of JSON back :)

I would use Bintray for this if Bintray supported, like GitHub Releases does, editing an existing release so that different builds (one per platform) can all call ./gradlew uploadToBintray with different assets.

In other words: the build on Windows would publish the Windows-specific asset, the Linux build would publish the Linux-specific asset and so on.

As I understand it, the only way to make it work right now is to publish different versions for each platform, which would be awkard.

Is it possible to achieve this, and if not, would you consider adding this as a new feature?

@natario1
Copy link

natario1 commented May 28, 2020

Maybe helpful: https://github.com/natario1/MavenPublisher you can do multiplatform releases like so:

publisher {
    // configure common stuff
    bintray("windows") {
         project.artifact = "lib-windows"
         // configure windows stuff
    }
    bintray("linux") {
        project.artifact = "lib-linux"
        // configure linux stuff
    }
} 

You get a separate task for each publication so there's no conflict.

@renatoathaydes
Copy link
Author

I use jlink to create the distributed images, and `jlink does not support cross-platform builds, that's why I need to build on each different platform (which GitHub Actions makes easy).

@natario1 would this work if the image for each platform was built on a separate machine, at different times (but still upload the assets for the same release version)?

@natario1
Copy link

natario1 commented May 28, 2020

I think as long as you use a different artifact name (like lib-windows and lib-linux), you can already do this with the official plugin, you just have to set override = true.

I thought your problem was with releasing different things from the same gradle project, which is not very straightforward with the official plugin

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

No branches or pull requests

2 participants